Re: archive_command options?

From: Jerry Sievers <gsievers19(at)comcast(dot)net>
To: LEROY TENNISON <leroy_tennison(at)prodigy(dot)net>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: archive_command options?
Date: 2019-04-04 00:18:24
Message-ID: 87mul6pqr3.fsf@jsievers.enova.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

LEROY TENNISON <leroy_tennison(at)prodigy(dot)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(dot)consulting(at)comcast(dot)net

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Johannes Truschnigg 2019-04-04 11:36:57 Re: archive_command options?
Previous Message LEROY TENNISON 2019-04-03 20:16:12 archive_command options?