mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Introduce replication slots.
Replication slots are a crash-safe data structure which can be created on either a master or a standby to prevent premature removal of write-ahead log segments needed by a standby, as well as (with hot_standby_feedback=on) pruning of tuples whose removal would cause replication conflicts. Slots have some advantages over existing techniques, as explained in the documentation. In a few places, we refer to the type of replication slots introduced by this patch as "physical" slots, because forthcoming patches for logical decoding will also have slots, but with somewhat different properties. Andres Freund and Robert Haas
This commit is contained in:
@ -57,6 +57,7 @@
|
||||
#include "postmaster/postmaster.h"
|
||||
#include "postmaster/syslogger.h"
|
||||
#include "postmaster/walwriter.h"
|
||||
#include "replication/slot.h"
|
||||
#include "replication/syncrep.h"
|
||||
#include "replication/walreceiver.h"
|
||||
#include "replication/walsender.h"
|
||||
@ -2123,6 +2124,17 @@ static struct config_int ConfigureNamesInt[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
/* see max_connections */
|
||||
{"max_replication_slots", PGC_POSTMASTER, REPLICATION_SENDING,
|
||||
gettext_noop("Sets the maximum number of simultaneously defined replication slots."),
|
||||
NULL
|
||||
},
|
||||
&max_replication_slots,
|
||||
0, 0, MAX_BACKENDS /* XXX?*/,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"wal_sender_timeout", PGC_SIGHUP, REPLICATION_SENDING,
|
||||
gettext_noop("Sets the maximum time to wait for WAL replication."),
|
||||
|
Reference in New Issue
Block a user