RE: Connection limits/permissions, slotsync workers, etc
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Laurenz Albe <laurenz.albe@cybertec.at>
Date: 2024-12-28T03:16:56Z
Lists: pgsql-hackers
On Saturday, December 28, 2024 1:31 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com> writes: > > On Thursday, December 26, 2024 3:50 AM Tom Lane <tgl@sss.pgh.pa.us> > >> I wonder if the AV launcher and slotsync worker could be reclassified > >> as "auxiliary processes" instead of being their own weird animal. > > > It appears that the current aux processes do not run transactions as > > stated in the comments[1], so we may need to somehow release this > > restriction to achieve the goal. > > Ah, right, I'd forgotten about that restriction. I agree that removing it wouldn't > be very reasonable. However, I still would rather avoid making the slotsync > worker be its very own special snowflake, because that offers no support for > the next person who wants to invent a new sort of specialized > transaction-capable process. > > 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. Best Regards, Hou zj
Commits
-
Replace PGPROC.isBackgroundWorker with isRegularBackend.
- 508a97ee4984 18.0 landed
-
Exclude parallel workers from connection privilege/limit checks.
- c58b0c43d36f 14.16 landed
- 70d067ceccf0 13.19 landed
- 41a252c2ca68 16.7 landed
- 3d1ecc92a0d1 15.11 landed
- 34486b6092e7 18.0 landed
- 15b4c46c328b 17.3 landed
-
Reserve a PGPROC slot and semaphore for the slotsync worker process.
- 2bdf1b2a2efc 18.0 landed
- 14141bbbc103 17.3 landed
-
Try to avoid semaphore-related test failures on NetBSD/OpenBSD.
- a46311ed7214 17.3 landed