Re: Connection limits/permissions, slotsync workers, etc

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Laurenz Albe <laurenz.albe@cybertec.at>
Date: 2024-12-28T21:24:06Z
Lists: pgsql-hackers
"Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com> writes:
> On Saturday, December 28, 2024 1:31 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Attached is an alternative proposal that groups the autovac launcher and
>> slotsync worker into a new category of "special workers" (better name
>> welcome).  I chose to put them into the existing autovacFreeProcs freelist,
>> partly because the autovac launcher lives there already but mostly because I
>> don't want to add another freelist in a patch we need to put into v17.  (As
>> written, your patch is an ABI break.

> Right, thanks for pointing it out. The new version patch looks good to me.

Pushed, thanks for looking at it.

			regards, tom lane



Commits

  1. Replace PGPROC.isBackgroundWorker with isRegularBackend.

  2. Exclude parallel workers from connection privilege/limit checks.

  3. Reserve a PGPROC slot and semaphore for the slotsync worker process.

  4. Try to avoid semaphore-related test failures on NetBSD/OpenBSD.