git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ff90ee6) | patch
Reserve a PGPROC slot and semaphore for the slotsync worker process.
2024年12月28日 17:30:42 +0000 (12:30 -0500)
2024年12月28日 17:30:42 +0000 (12:30 -0500)
commit 2bdf1b2a2efc7bbbe2db3213153c14615485eadd
Reserve a PGPROC slot and semaphore for the slotsync worker process.

The need for this was missed in commit 93db6cbda, with the result
being that if we launch a slotsync worker it would consume one of
the PGPROCs in the max_connections pool. That could lead to inability
to launch the worker, or to subsequent failures of connection requests
that should have succeeded according to the configured settings.

Rather than create some one-off infrastructure to support this,
let's group the slotsync worker with the existing autovac launcher
in a new category of "special worker" processes. These are kind of
like auxiliary processes, but they cannot use that infrastructure
because they need to be able to run transactions.

For the moment, make these processes share the PGPROC freelist
used for autovac workers (which previously supplied the autovac
launcher too). This is partly to avoid an ABI change in v17,
and partly because it seems silly to have a freelist with
at most two members. This might be worth revisiting if we grow
enough workers in this category.

Tom Lane and Hou Zhijie. Back-patch to v17.

Discussion: https://postgr.es/m/1808397.1735156190@sss.pgh.pa.us
src/backend/storage/lmgr/proc.c diff | blob | blame | history
src/backend/utils/init/postinit.c diff | blob | blame | history
src/include/miscadmin.h diff | blob | blame | history
src/include/storage/proc.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /