pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Vikas Sharma <shavikas@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg_receivexlog or archive_command
Date: Wed, 2 Oct 2019 02:17:54 -0400
Message-ID: <20191002061754.GE6962@tamriel.snowman.net> (raw)
In-Reply-To: <500e2a7e-8c40-32bb-432b-8f728daf4e5a@2ndquadrant.com>
References: <CAN6gwKwx865jv0fqc7SfwsG3utPhSoFF_tFaptcoDUW+T0uP8w@mail.gmail.com>
	<500e2a7e-8c40-32bb-432b-8f728daf4e5a@2ndquadrant.com>

Greetings,

* Peter Eisentraut (peter.eisentraut@2ndquadrant.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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (7+ messages)

Message-ID: <20191002061754.GE6962@tamriel.snowman.net>
Permalink:  ../20191002061754.GE6962@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20191002061754.GE6962@tamriel.snowman.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-general@postgresql.org
  Cc: sfrost@snowman.net, peter.eisentraut@2ndquadrant.com, shavikas@gmail.com, pgsql-general@lists.postgresql.org
  Subject: Re: pg_receivexlog or archive_command
  In-Reply-To: <20191002061754.GE6962@tamriel.snowman.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