Re: [GENERAL] Logging the fact that a log was shipped - Mailing list pgsql-general

From Christoph Moench-Tegeder
Subject Re: [GENERAL] Logging the fact that a log was shipped
Date
Msg-id 20170828150643.ld5rd5eskw3kexc3@squirrel.exwg.net
Whole thread Raw
In response to Re: [GENERAL] Logging the fact that a log was shipped  (Stephen Frost <sfrost@snowman.net>)
Responses Re: [GENERAL] Logging the fact that a log was shipped  (Stephen Frost <sfrost@snowman.net>)
List pgsql-general
## Stephen Frost (sfrost@snowman.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.


pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: [GENERAL] Logging the fact that a log was shipped
Next
From: Christoph Moench-Tegeder
Date:
Subject: Re: [GENERAL] Logging the fact that a log was shipped