pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-docs <pgsql-docs@postgresql.org>
Subject: Re: obsolete pg_receivexlog note?
Date: Wed, 05 Nov 2014 16:42:02 -0500
Message-ID: <545A99AA.5020107@gmx.net> (raw)
In-Reply-To: <54454F47.50407@gmx.net>
References: <54454F47.50407@gmx.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

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.

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Attachments:

pg-receivexlog-notes.patch (application/x-patch, 1.4K) download 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 &amp;&amp; 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>

view thread (6+ messages)  latest in thread

Message-ID: <545A99AA.5020107@gmx.net>
Permalink:  ../545A99AA.5020107@gmx.net/
Also on:    postgresql.org/message-id/545A99AA.5020107@gmx.net

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: obsolete pg_receivexlog note?
  In-Reply-To: <545A99AA.5020107@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox