pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedobsolete pg_receivexlog note?
6+ messages / 2 participants
[nested] [flat]
* obsolete pg_receivexlog note?
@ 2014-10-20 18:07 Peter Eisentraut <peter_e@gmx.net>
2014-11-05 21:42 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Eisentraut @ 2014-10-20 18:07 UTC (permalink / raw)
To: 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.
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: obsolete pg_receivexlog note?
2014-10-20 18:07 obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
@ 2014-11-05 21:42 ` Peter Eisentraut <peter_e@gmx.net>
2014-11-05 23:54 ` Re: obsolete pg_receivexlog note? Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Eisentraut @ 2014-11-05 21:42 UTC (permalink / raw)
To: 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.
--
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 && 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>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: obsolete pg_receivexlog note?
2014-10-20 18:07 obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-05 21:42 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
@ 2014-11-05 23:54 ` Michael Paquier <michael.paquier@gmail.com>
2014-11-06 00:36 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 6+ messages in thread
From: Michael Paquier @ 2014-11-05 23:54 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-docs
On Thu, Nov 6, 2014 at 6:42 AM, Peter Eisentraut <peter_e@gmx.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
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: obsolete pg_receivexlog note?
2014-10-20 18:07 obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-05 21:42 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-05 23:54 ` Re: obsolete pg_receivexlog note? Michael Paquier <michael.paquier@gmail.com>
@ 2014-11-06 00:36 ` Peter Eisentraut <peter_e@gmx.net>
2014-11-08 01:30 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Eisentraut @ 2014-11-06 00:36 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: 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.
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: obsolete pg_receivexlog note?
2014-10-20 18:07 obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-05 21:42 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-05 23:54 ` Re: obsolete pg_receivexlog note? Michael Paquier <michael.paquier@gmail.com>
2014-11-06 00:36 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
@ 2014-11-08 01:30 ` Peter Eisentraut <peter_e@gmx.net>
2014-11-08 05:10 ` Re: obsolete pg_receivexlog note? Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Peter Eisentraut @ 2014-11-08 01:30 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: 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.
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: obsolete pg_receivexlog note?
2014-10-20 18:07 obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-05 21:42 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-05 23:54 ` Re: obsolete pg_receivexlog note? Michael Paquier <michael.paquier@gmail.com>
2014-11-06 00:36 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-08 01:30 ` Re: obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
@ 2014-11-08 05:10 ` Michael Paquier <michael.paquier@gmail.com>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2014-11-08 05:10 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-docs
On Sat, Nov 8, 2014 at 10:30 AM, Peter Eisentraut <peter_e@gmx.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
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2014-11-08 05:10 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-10-20 18:07 obsolete pg_receivexlog note? Peter Eisentraut <peter_e@gmx.net>
2014-11-05 21:42 ` Peter Eisentraut <peter_e@gmx.net>
2014-11-05 23:54 ` Michael Paquier <michael.paquier@gmail.com>
2014-11-06 00:36 ` Peter Eisentraut <peter_e@gmx.net>
2014-11-08 01:30 ` Peter Eisentraut <peter_e@gmx.net>
2014-11-08 05:10 ` Michael Paquier <michael.paquier@gmail.com>
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