mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
pg_basebackup: Add option to create replication slot
When requesting a particular replication slot, the new pg_basebackup option -C/--create-slot creates it before starting to replicate from it. Further refactor the slot creation logic to include the temporary slot creation logic into the same function. Add new arguments is_temporary and preserve_wal to CreateReplicationSlot(). Print in --verbose mode that a slot has been created. Author: Michael Banck <michael.banck@credativ.de>
This commit is contained in:
@@ -33,8 +33,9 @@ extern PGconn *GetConnection(void);
|
||||
|
||||
/* Replication commands */
|
||||
extern bool CreateReplicationSlot(PGconn *conn, const char *slot_name,
|
||||
const char *plugin, bool is_physical,
|
||||
bool slot_exists_ok);
|
||||
const char *plugin, bool is_temporary,
|
||||
bool is_physical, bool reserve_wal,
|
||||
bool slot_exists_ok);
|
||||
extern bool DropReplicationSlot(PGconn *conn, const char *slot_name);
|
||||
extern bool RunIdentifySystem(PGconn *conn, char **sysid,
|
||||
TimeLineID *starttli,
|
||||
|
||||
Reference in New Issue
Block a user