Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server - Mailing list pgsql-hackers

From Paul A Jungwirth
Subject Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server
Date
Msg-id CA+renyXjGtfHoEW7aaYOSZq39S_NxgSd+VsdfEUFqMNyKmr4Mg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server
Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server
List 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



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: LP_DEAD hinting and not holding on to a buffer pin on leaf page(Was: [HACKERS] [WIP] Zipfian distribution in pgbench)
Next
From: Paul A Jungwirth
Date:
Subject: Re: [HACKERS] pg_stop_backup(wait_for_archive := true) on standby server