pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jerry Sievers <gsievers19@comcast.net>
To: LEROY TENNISON <leroy_tennison@prodigy.net>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: archive_command options?
Date: Wed, 03 Apr 2019 19:18:24 -0500
Message-ID: <87mul6pqr3.fsf@jsievers.enova.com> (raw)
In-Reply-To: <1222332414.512321.1554322572303@mail.yahoo.com>
References: <1222332414.512321.1554322572303.ref@mail.yahoo.com>
	<1222332414.512321.1554322572303@mail.yahoo.com>

LEROY TENNISON <leroy_tennison@prodigy.net> writes:

> Postgresql documentation lists the following as an archive command
> for log shipping:
>
> archive_command = 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/
> server/archivedir/%f'
>
> The problem is that it is very fragile.  If anything breaks the copy
> (either system failing, network issues) then log shipping stops
> because the file exists in some intermediate state.  The result is
> that logs build up on the source system filling disk space.  I've had
> to deal with a few of these this week, in two cases the file system
> was 98% full.  Is there a reason rsync isn't used?  It has the
> ability to restart interrupted transfers.  I don't want to use it
> only to find out i got myself into another predicament.  Any other
> less-fragile options?  Thanks for the help.

You are free to use any $better thing as archive command.

The classic example given in the docs is appealing for simplicity's
sake.

I don't understand your piece about "restart interrupted transfers".
Postgres will only archive 1 file at a time anyhow and will
retry/restart till whatever your archive_command is returns true.

16M WAL segments aren't these days large enough IMO that being able to
carry on a half-copied file is compelling.

HTH





>
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net





view thread (5+ messages)  latest in thread

Message-ID: <87mul6pqr3.fsf@jsievers.enova.com>
Permalink:  ../87mul6pqr3.fsf@jsievers.enova.com/
Also on:    postgresql.org/message-id/87mul6pqr3.fsf@jsievers.enova.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-admin@postgresql.org
  Cc: gsievers19@comcast.net, leroy_tennison@prodigy.net, pgsql-admin@lists.postgresql.org
  Subject: Re: archive_command options?
  In-Reply-To: <87mul6pqr3.fsf@jsievers.enova.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