On 10/20/14 2:07 PM, Peter Eisentraut wrote: > The reference page for pg_receivexlog > (http://www.postgresql.org/docs/9.4/static/app-pgreceivexlog.html) has > this note: > > """ > When using pg_receivexlog instead of archive_command, the server will > continue to recycle transaction log files even if the backups are not > properly archived, since there is no command that fails. This can be > worked around by having an archive_command that fails when the file has > not been properly archived yet, for example: > > archive_command = 'sleep 5 && test -f /mnt/server/archivedir/%f' > The initial timeout is necessary because pg_receivexlog works using > asynchronous replication and can therefore be slightly behind the master. > """ > > ISTM that this should be replaced with something to the effect of, if > you are using pg_receivexlog instead of archive_command, you had better > use slots.
Here is a patch.
diff --git a/doc/src/sgml/ref/pg_receivexlog.sgml b/doc/src/sgml/ref/pg_receivexlog.sgml index 2ab392e..f90b61c 100644 --- a/doc/src/sgml/ref/pg_receivexlog.sgml +++ b/doc/src/sgml/ref/pg_receivexlog.sgml @@ -324,17 +324,12 @@ <title>Notes</title> <para> When using <application>pg_receivexlog</application> instead of - <xref linkend="guc-archive-command">, the server will continue to - recycle transaction log files even if the backups are not properly - archived, since there is no command that fails. This can be worked - around by having an <xref linkend="guc-archive-command"> that fails - when the file has not been properly archived yet, for example: -<programlisting> -archive_command = 'sleep 5 && test -f /mnt/server/archivedir/%f' -</programlisting> - The initial timeout is necessary because - <application>pg_receivexlog</application> works using asynchronous - replication and can therefore be slightly behind the master. + <xref linkend="guc-archive-command"> as the main WAL backup method, it is + strongly recommended to use replication slots. Otherwise, the server is + free to recycle or remove transaction log files before they are backed up, + because it does not have any information, either + from <xref linkend="guc-archive-command"> or the replication slots, about + how far the WAL stream has been archived. </para> </refsect1>
-- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs