Re: pg_stop_backup(wait_for_archive := true) on standby server
Paul A Jungwirth <pj@illuminatedcomputing.com>
From: Paul A Jungwirth <pj@illuminatedcomputing.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Michael Paquier <michael.paquier@gmail.com>,
Stephen Frost <sfrost@snowman.net>, Magnus Hagander <magnus@hagander.net>,
Masahiko Sawada <sawada.mshk@gmail.com>, Noah Misch <noah@leadboat.com>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-08-05T20:28:55Z
Lists: pgsql-hackers
On Sat, Aug 5, 2017 at 7:51 AM, Robert Haas <robertmhaas@gmail.com> wrote: > After refreshing my memory further, I take it back. pg_stop_backup() > doesn't even have a second argument on v9.6, so back-porting this fix > to 9.6 is a meaningless thing; there's nothing to fix. According to the docs at https://www.postgresql.org/docs/9.6/static/functions-admin.html there is a one-arg version in 9.6. I've been watching this thread since I noticed it a few days ago. I have a system on 9.6 with replication, where the standby uses `archive_mode: always` so that I can run WAL-E backups from there instead of from the master. I'm a little worried about my backup integrity now (It sounds like this might be a "it usually works" situation). Also, WAL-E currently uses the no-arg pg_stop_backup, but I was contemplating offering a patch to use non-exclusive backups when available, both to avoid stopping the standby and also to generate a tablespace description (which WAL-E requires when restoring with tablespaces). Just thought I'd offer a real use-case for the non-exclusive-mode functions on 9.6. I don't have an opinion on the urgency of back-porting a fix, but if pg_stop_backup(boolean) allows for inconsistent backups, it does sound like a problem on 9.6 too. Paul
Commits
-
Make pg_stop_backup's wait_for_archive flag work on standbys.
- 52f8a59dd953 10.0 landed
-
Implement backup API functions for non-exclusive backups
- 7117685461af 9.6.0 cited