Re: obsolete pg_receivexlog note?

Lists: pgsql-docs
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: obsolete pg_receivexlog note?
Date: 2014-10-20 18:07:03
Message-ID: 54454F47.50407@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

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.


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: obsolete pg_receivexlog note?
Date: 2014-11-05 21:42:02
Message-ID: 545A99AA.5020107@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-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.

Attachment Content-Type Size
pg-receivexlog-notes.patch application/x-patch 1.4 KB

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: obsolete pg_receivexlog note?
Date: 2014-11-05 23:54:57
Message-ID: CAB7nPqS-JmMCcz5Tx5i4q6U8=3SKFJXdwDz=z=1hwsyD3E_F2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On Thu, Nov 6, 2014 at 6:42 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
>
> 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.

In this paragraph, is it worth mentioning as well that the tradeoff
when using replication slots is to monitor the xlog partition to be
sure it doesn't get full?
--
Michael


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: obsolete pg_receivexlog note?
Date: 2014-11-06 00:36:11
Message-ID: 545AC27B.1050701@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On 11/5/14 6:54 PM, Michael Paquier wrote:
> In this paragraph, is it worth mentioning as well that the tradeoff
> when using replication slots is to monitor the xlog partition to be
> sure it doesn't get full?

Might as well.


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: obsolete pg_receivexlog note?
Date: 2014-11-08 01:30:52
Message-ID: 545D724C.1030906@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On 11/5/14 7:36 PM, Peter Eisentraut wrote:
> On 11/5/14 6:54 PM, Michael Paquier wrote:
>> In this paragraph, is it worth mentioning as well that the tradeoff
>> when using replication slots is to monitor the xlog partition to be
>> sure it doesn't get full?
>
> Might as well.

Committed.


From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: obsolete pg_receivexlog note?
Date: 2014-11-08 05:10:19
Message-ID: CAB7nPqR0+gQQjFFpgkiUbLFfRvXQRKYa61Y7QHRaBp2xr46T=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

On Sat, Nov 8, 2014 at 10:30 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On 11/5/14 7:36 PM, Peter Eisentraut wrote:
>> On 11/5/14 6:54 PM, Michael Paquier wrote:
>>> In this paragraph, is it worth mentioning as well that the tradeoff
>>> when using replication slots is to monitor the xlog partition to be
>>> sure it doesn't get full?
>>
>> Might as well.
>
> Committed.
Thanks for adding a note about partitions that may get full.
--
Michael