Re: PATCH: Make pg_stop_backup() archive wait optional

From: David Steele <david(at)pgmasters(dot)net>
To: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Make pg_stop_backup() archive wait optional
Date: 2017-03-02 03:42:22
Message-ID: fc986d0b-447d-6f1e-9ba3-9c1f47a94891@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)pgmasters(dot)net

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2017-03-02 03:47:13 Re: PATCH: two slab-like memory allocators
Previous Message Tomas Vondra 2017-03-02 03:36:23 Re: PATCH: two slab-like memory allocators