Re: Logging the fact that a log was shipped

From: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Logging the fact that a log was shipped
Date: 2017-08-28 15:06:43
Message-ID: 20170828150643.ld5rd5eskw3kexc3@squirrel.exwg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

## Stephen Frost (sfrost(at)snowman(dot)net):

> Worse, such scripts run the serious risk of losing WAL if a crash
> happens because nothing is ensuring that the WAL has been sync'd to disk
> before returning from the archive_command.

That risk already exists when using rsync/scp/scp/... and should be
mitigated by filesystem settings on the receiving side.

> Most of the existing tools for dealing with WAL archival (pgbackrest,
> barman and WAL-E, at least) already log successful and unsuccessful
> archive command runs. I'm pretty sure barman supports back to 8.4 and I
> know pgbackrest does.

Barman would have to use rsync for the archiving with PostgreSQL 8.4
(pg_receivexlog only came along in 9.2, replication slots in 9.4).
Logging will not happen on completion of archive_command (barman
doesn't know much about that) but only when the xlog segment is
being processed by barman - which could be quite some time later.

Regards,
Christoph

--
Spare Space.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Moench-Tegeder 2017-08-28 15:11:40 Re: Logging the fact that a log was shipped
Previous Message Ron Johnson 2017-08-28 13:39:29 Re: Logging the fact that a log was shipped