postgresql/src/include/storage
Michael Paquier ea92368cd1 Move max_wal_senders out of max_connections for connection slot handling
Since its introduction, max_wal_senders is counted as part of
max_connections when it comes to define how many connection slots can be
used for replication connections with a WAL sender context.  This can
lead to confusion for some users, as it could be possible to block a
base backup or replication from happening because other backend sessions
are already taken for other purposes by an application, and
superuser-only connection slots are not a correct solution to handle
that case.

This commit makes max_wal_senders independent of max_connections for its
handling of PGPROC entries in ProcGlobal, meaning that connection slots
for WAL senders are handled using their own free queue, like autovacuum
workers and bgworkers.

One compatibility issue that this change creates is that a standby now
requires to have a value of max_wal_senders at least equal to its
primary.  So, if a standby created enforces the value of
max_wal_senders to be lower than that, then this could break failovers.
Normally this should not be an issue though, as any settings of a
standby are inherited from its primary as postgresql.conf gets normally
copied as part of a base backup, so parameters would be consistent.

Author: Alexander Kukushkin
Reviewed-by: Kyotaro Horiguchi, Petr Jelínek, Masahiko Sawada, Oleksii
Kliukin
Discussion: https://postgr.es/m/CAFh8B=nBzHQeYAu0b8fjK-AF1X4+_p6GRtwG+cCgs6Vci2uRuQ@mail.gmail.com
2019-02-12 10:07:56 +09:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
backendid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
barrier.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
block.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
buf.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
buf_internals.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
buffile.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
bufmgr.h Change snapshot type to be determined by enum rather than callback. 2019-01-21 17:03:15 -08:00
bufpage.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
checksum.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
checksum_impl.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
condition_variable.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
copydir.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
dsm.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
dsm_impl.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
fd.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
freespace.h Avoid creation of the free space map for small heap relations, take 2. 2019-02-04 07:49:15 +05:30
fsm_internals.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
indexfsm.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
ipc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
item.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
itemid.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
itemptr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
large_object.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
latch.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
lmgr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
lock.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
lockdefs.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
lwlock.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
off.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_sema.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_shmem.h Add shared_memory_type GUC. 2019-02-03 12:47:26 +01:00
pmsignal.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
predicate.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
predicate_internals.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
proc.h Move max_wal_senders out of max_connections for connection slot handling 2019-02-12 10:07:56 +09:00
procarray.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
proclist.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
proclist_types.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
procsignal.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
reinit.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
relfilenode.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
s_lock.h Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
sharedfileset.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
shm_mq.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
shm_toc.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
shmem.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sinval.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
sinvaladt.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
smgr.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
spin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
standby.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
standbydefs.h Update copyright for 2019 2019-01-02 12:44:25 -05:00