postgresql/src/include
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
..
access Move max_wal_senders out of max_connections for connection slot handling 2019-02-12 10:07:56 +09:00
bootstrap Update copyright for 2019 2019-01-02 12:44:25 -05:00
catalog Move max_wal_senders out of max_connections for connection slot handling 2019-02-12 10:07:56 +09:00
commands Move vacuumlazy.c into access/heap. 2019-01-15 12:06:19 -08:00
common Use perfect hashing, instead of binary search, for keyword lookup. 2019-01-09 19:47:46 -05:00
datatype Update copyright for 2019 2019-01-02 12:44:25 -05:00
executor Allow to reset execGrouping.c style tuple hashtables. 2019-02-09 01:05:49 -08:00
fe_utils pgbench: add \cset and \gset commands 2019-01-10 13:42:20 -03:00
foreign Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
jit Renaming for new subscripting mechanism 2019-02-01 12:50:32 -03:00
lib simplehash: Add support for resetting a hashtable's contents. 2019-02-09 01:05:49 -08:00
libpq Add more columns to pg_stat_ssl 2019-02-01 00:33:47 +01:00
mb Update copyright for 2019 2019-01-02 12:44:25 -05:00
nodes Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
optimizer Build out the planner support function infrastructure. 2019-02-09 18:32:23 -05:00
parser Create the infrastructure for planner support functions. 2019-02-09 18:08:48 -05:00
partitioning Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
port Update copyright for 2019 2019-01-02 12:44:25 -05:00
portability Update copyright for 2019 2019-01-02 12:44:25 -05:00
postmaster Update copyright for 2019 2019-01-02 12:44:25 -05:00
regex Update copyright for 2019 2019-01-02 12:44:25 -05:00
replication Update copyright for 2019 2019-01-02 12:44:25 -05:00
rewrite Update copyright for 2019 2019-01-02 12:44:25 -05:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Rename nodes/relation.h to nodes/pathnodes.h. 2019-01-29 16:49:25 -05:00
storage Move max_wal_senders out of max_connections for connection slot handling 2019-02-12 10:07:56 +09:00
tcop Update copyright for 2019 2019-01-02 12:44:25 -05:00
tsearch Update copyright for 2019 2019-01-02 12:44:25 -05:00
utils Fix misleading PG_RE_THROW commentary 2019-02-11 15:56:09 -03:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
fmgr.h Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
funcapi.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
getaddrinfo.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
getopt_long.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
Makefile Install JIT related headers. 2019-01-28 13:51:12 -08:00
miscadmin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_config.h.in Second try at fixing ecpglib thread-safety problem. 2019-01-21 16:17:10 -05:00
pg_config.h.win32 Second try at fixing ecpglib thread-safety problem. 2019-01-21 16:17:10 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pg_getopt.h Use our own getopt() on OpenBSD. 2019-01-18 15:06:26 -05:00
pg_trace.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pgstat.h Add more columns to pg_stat_ssl 2019-02-01 00:33:47 +01:00
pgtar.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pgtime.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
port.h Fix misc typos in comments. 2019-01-23 13:39:00 +02:00
postgres.h Change function call information to be variable length. 2019-01-26 14:17:52 -08:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
rusagestub.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
windowapi.h Update copyright for 2019 2019-01-02 12:44:25 -05:00