Reserve replication slots specifically for REPACK

Add a new GUC max_repack_replication_slots, which lets the user reserve
some additional replication slots for concurrent repack (and only
concurrent repack).  With this, the user doesn't have to worry about
changing the max_replication_slots in order to cater for use of
concurrent repack.

(We still use the same pool of bgworkers though, but that's less
commonly a problem than slots.)

Author: Álvaro Herrera <[email protected]>
Reviewed-by: Srinath Reddy Sadipiralla <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e76d8c749c3152657711ed733f0aea61c0e36a91

Modified Files
--------------
doc/src/sgml/config.sgml                       | 15 +++++
doc/src/sgml/ref/repack.sgml                   |  6 +-
src/backend/commands/repack_worker.c           |  7 +-
src/backend/replication/logical/launcher.c     |  2 +-
src/backend/replication/logical/logical.c      |  8 ++-
src/backend/replication/logical/logicalfuncs.c |  2 +-
src/backend/replication/logical/slotsync.c     |  5 +-
src/backend/replication/slot.c                 | 92 +++++++++++++++++---------
src/backend/replication/slotfuncs.c            | 19 +++---
src/backend/replication/walsender.c            |  9 +--
src/backend/utils/misc/guc_parameters.dat      |  8 +++
src/backend/utils/misc/postgresql.conf.sample  |  2 +
src/include/replication/logical.h              |  3 +-
src/include/replication/slot.h                 |  5 +-
14 files changed, 121 insertions(+), 62 deletions(-)

Reply via email to