Re: Updated backup APIs for non-exclusive backups

From: David Steele <david(at)pgmasters(dot)net>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>, Noah Misch <noah(at)leadboat(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Updated backup APIs for non-exclusive backups
Date: 2018-12-12 04:43:45
Message-ID: 44c2a193-e189-d514-c844-12d8ece643c5@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/11/18 5:33 PM, Laurenz Albe wrote:
> On Mon, 2018-11-26 at 10:18 +0100, Magnus Hagander wrote:
>>> [about managing backups from pre- and post-file-system-backup scrips]
>>>> I agree with your point that it's not an uncommon thing to need. If a good solution
>>>> for it can be proposed that requires the exclusive backup interface, then I wouldn't
>>>> be against un-deprecating that. But that's going to require a lot more than just a
>>>> documentation change, IMHO. What could perhaps be handled with a documentation change,
>>>> however, is to document a good way for this type of setup to use the new interfaces.
>>>
>>> Good point, and it puts the ball in my court :^)
>>
>> Enjoy :)
>
> I have come up with some sample code here:
> https://github.com/cybertec-postgresql/safe-backup
>
> This just uses bash and psql.
> Does that look reasonably safe?
>
> It's probably too big to be introduced into the documentation, but maybe
> we could add it to the Wiki.

My bash-fu is not all that great, but it seems to me you could do this
all in one script and forgo the table entirely. Just do the file copy
at about line 60 in pgpre.sh.

It does look workable to me, just wonder if it could be simpler.

--
-David
david(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-12-12 05:14:13 Re: Add timeline to partial WAL segments
Previous Message Michael Paquier 2018-12-12 04:32:08 Re: allow online change primary_conninfo