pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Vikas Sharma <shavikas@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_receivexlog or archive_command
Date: Mon, 23 Sep 2019 20:31:54 +0200
Message-ID: <500e2a7e-8c40-32bb-432b-8f728daf4e5a@2ndquadrant.com> (raw)
In-Reply-To: <CAN6gwKwx865jv0fqc7SfwsG3utPhSoFF_tFaptcoDUW+T0uP8w@mail.gmail.com>
References: <CAN6gwKwx865jv0fqc7SfwsG3utPhSoFF_tFaptcoDUW+T0uP8w@mail.gmail.com>

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.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (7+ messages)  latest in thread

Message-ID: <500e2a7e-8c40-32bb-432b-8f728daf4e5a@2ndquadrant.com>
Permalink:  ../500e2a7e-8c40-32bb-432b-8f728daf4e5a@2ndquadrant.com/
Also on:    postgresql.org/message-id/500e2a7e-8c40-32bb-432b-8f728daf4e5a@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com, shavikas@gmail.com, pgsql-general@lists.postgresql.org
  Subject: Re: pg_receivexlog or archive_command
  In-Reply-To: <500e2a7e-8c40-32bb-432b-8f728daf4e5a@2ndquadrant.com>

* 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