Re: `pg_ctl init` crashes when run concurrently; semget(2) suspected

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: "Burd, Greg" <greg@burd.me>, Gavin Panella <gavinpanella@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-08-16T03:16:30Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> And just by the way, each backend has its own semaphore, so in actual
> usage we're probably only talking about the "superfluous wakeups"
> mentioned in lwlock.c, clog.c and procarray.c.  I suppose it's not
> expected to go very high at all?

I wouldn't expect so.

			regards, tom lane



Commits

  1. Don't treat EINVAL from semget() as a hard failure.

  2. Give up on running with NetBSD/OpenBSD's default semaphore settings.