From 3709ca1cf069cee24ef8000cb6a479813b5537df Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 26 Sep 2017 16:07:52 -0400 Subject: 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 --- doc/src/sgml/ref/pg_basebackup.sgml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml index b7aa128f7f7..f790c560034 100644 --- a/doc/src/sgml/ref/pg_basebackup.sgml +++ b/doc/src/sgml/ref/pg_basebackup.sgml @@ -382,6 +382,18 @@ PostgreSQL documentation + + + + + + This option causes the replication slot specified by the + option --slot to be created before starting the + backup. In this case, an error is raised if the slot already exists. + + + + @@ -462,6 +474,10 @@ PostgreSQL documentation the server does not remove any necessary WAL data in the time between the end of the base backup and the start of streaming replication. + + The specified replication slot has to exist unless the + option is also used. + If this option is not specified and the server supports temporary replication slots (version 10 and later), then a temporary replication -- cgit v1.2.3