1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-31 12:33:33 +02:00

fix temp replication slot for PG >= 11

This commit is contained in:
Grigory Smolkin 2019-03-01 18:40:29 +03:00
parent d9cb01a167
commit 53bd83bfcd

View File

@ -2772,6 +2772,14 @@ StreamLog(void *arg)
replication_slot = "pg_probackup_slot";
#endif
#if PG_VERSION_NUM >= 110000
/* Create temp repslot */
if (temp_slot)
CreateReplicationSlot(stream_arg->conn, replication_slot,
NULL, temp_slot, true, true, false);
#endif
/*
* Start the replication
*/
@ -2792,7 +2800,9 @@ StreamLog(void *arg)
ctl.walmethod = CreateWalDirectoryMethod(stream_arg->basedir, 0, true);
ctl.replication_slot = replication_slot;
ctl.stop_socket = PGINVALID_SOCKET;
#if PG_VERSION_NUM >= 100000 && PG_VERSION_NUM < 110000
ctl.temp_slot = temp_slot;
#endif
#else
ctl.basedir = (char *) stream_arg->basedir;
#endif