Re: Updated backup APIs for non-exclusive backups - Mailing list pgsql-hackers

From David Steele
Subject Re: Updated backup APIs for non-exclusive backups
Date
Msg-id 570260B3.6090504@pgmasters.net
Whole thread Raw
In response to Re: Updated backup APIs for non-exclusive backups  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On 3/19/16 8:15 AM, Magnus Hagander wrote:

> I've attached an updated patch, which is rebased on current master and
> includes the oid fix.

I've now had a chance to go through this in detail and test thoroughly.  We had a lot of discussion about copying
pg_controllast and that led 
 
me to believe that there might be some sort of race condition with 
multiple backups running concurrently.

I tried every trick I could think of and everything worked as expected 
so as far as I can see this requirement only applies to backups taken 
from a standby which agrees with the comments in do_pg_stop_backup().

Note that I only tested backups against a master database since that's 
what is modified by this patch.  I'm still not entirely comfortable with 
how backups against a standby are done and it that case still think it 
would be best to write the stop wal location into backup_label, but as 
you said before that would be a completely separate patch.

So in the end I'm fine with the code as it stands with the exception of 
the pg_stop_backup2() naming.  I'd prefer a more verbose name here but 
I'm unable to come up with anything very good.  How about 
pg_stop_backup_v2()?  This function could also use a few more comments, 
at least at the top of the exclusive and non-exclusive blocks.

Except for those minor details I believe this is "ready for committer" 
unless anybody has an objection.

-- 
-David
david@pgmasters.net



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: GIN data corruption bug(s) in 9.6devel
Next
From: Aleksander Alekseev
Date:
Subject: Tiny patch: sigmask.diff