Commit 69671ab5 authored by Robert Haas's avatar Robert Haas

doc: Suggesting clearing pg_replslot from a hot filesystem backup.

Maybe we'll settle on another way of solving this problem, but for
now this is the recommended procedure.

Per discussion with Michael Paquier.
parent c050b2aa
...@@ -943,6 +943,21 @@ SELECT pg_stop_backup(); ...@@ -943,6 +943,21 @@ SELECT pg_stop_backup();
(These files can confuse <application>pg_ctl</>.) (These files can confuse <application>pg_ctl</>.)
</para> </para>
<para>
It is often a good idea to also omit from the backup dump the files
within the cluster's <filename>pg_replslot/</> directory, so that
replication slots that exist on the master do not become part of the
backup. Otherwise, the subsequent use of the backup to create a standby
may result in indefinite retention of WAL files on the standby, and
possibly bloat on the master if hot standby feedback is enabled, because
the clients that are using those replication slots will still be connecting
to and updating the slots on the master, not the standby. Even if the
backup is only intended for use in creating a new master, copying the
replication slots isn't expected to be particularly useful, since the
contents of those slots will likely be badly out of date by the time
the new master comes on line.
</para>
<para> <para>
It's also worth noting that the <function>pg_start_backup</> function It's also worth noting that the <function>pg_start_backup</> function
makes a file named <filename>backup_label</> in the database cluster makes a file named <filename>backup_label</> in the database cluster
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment