Re: pg_receivexlog or archive_command

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Vikas Sharma <shavikas(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: pg_receivexlog or archive_command
Date: 2019-10-02 06:17:54
Message-ID: 20191002061754.GE6962@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings,

* Peter Eisentraut (peter(dot)eisentraut(at)2ndquadrant(dot)com) wrote:
> On 2019-09-23 10:25, Vikas Sharma wrote:
> > I am wondering which one is the best way to archive the xlogs for Backup
> > and Recovery - pg_receivexlog or archive_command.
>
> I recommend using pg_receivexlog. It has two important advantages over
> archive_command: 1) You can have multiple instances of pg_receivexlog
> running and copying things to different places. This is complicated to
> do correctly with archive_command. 2) pg_receivexlog will fsync the
> files it writes. This is also complicated to do correctly with
> archive_command.

Yes, it definitely is difficult to write your own archive_command, in
general, so, please, just don't. Use one of the existing tools that
have been well tested and written specifically to work with PG and to
provide the guarantees that an archive command should.

Thanks,

Stephen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2019-10-02 07:36:53 Re: Users, Roles and Connection Pooling
Previous Message Stephen Frost 2019-10-02 06:16:51 Re: pg_receivexlog or archive_command