Re: PATCH: Make pg_stop_backup() archive wait optional
David Steele <david@pgmasters.net>
From: David Steele <david@pgmasters.net>
To: Jim Nasby <Jim.Nasby@BlueTreble.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-03-02T03:42:22Z
Lists: pgsql-hackers
On 3/1/17 5:11 PM, Jim Nasby wrote: > On 2/27/17 6:25 PM, David Steele wrote: >> The purpose of this patch is to make waiting for archive optional, with >> the default being the current behavior, i.e., to wait for all WAL to be >> archived. This functionality is already used internally by >> pg_basebackup, so the only real change is to expose it through the >> pg_stop_backup() function. > > Do the docs mention anywhere how to monitor WAL archiving to know if > you've got all the necessary WAL? Perhaps a function to do that would be > worth adding. The docs in the patch mention that this option should only be used by backup solutions that know how to monitor archiving: + This behavior is only useful for backup + software which independently monitors WAL archiving, otherwise WAL + required to make the backup consistent might be missing and make the backup + useless. There is already a view, pg_stat_archiver, that allows a program to see what has been archived. I'm not sure we'd be adding much by putting a function around that. I would be OK with adding a link to pg_stat_archiver in the pg_stop_backup() documentation to if that seems appropriate. -- -David david@pgmasters.net
Commits
-
Expose waitforarchive option through pg_stop_backup()
- 017e4f2588a7 10.0 landed
-
Mark pg_start_backup and pg_stop_backup as parallel-restricted.
- 9fe3c644a731 10.0 landed