From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | David Steele <david(at)pgmasters(dot)net> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Remove Deprecated Exclusive Backup Mode |
Date: | 2020-07-01 21:25:26 |
Message-ID: | 20200701212526.GG14470@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jul 1, 2020 at 05:20:16PM -0400, David Steele wrote:
> On 7/1/20 4:32 PM, Bruce Momjian wrote:
> > On Wed, Jul 1, 2020 at 04:27:58PM -0400, David Steele wrote:
> > > On 7/1/20 3:58 PM, Robert Haas wrote:
> > > > If we could jigger things so that you don't need to stop the backup at
> > > > all, you only start it, and whether you ever finish copying everything
> > > > is something about which the system need not know or care, that would
> > > > be a lot nicer. I'm not sure I see how to do that, though.
> > >
> > > Well, the only thing pg_stop_backup() *really* needs to know is the starting
> > > WAL position. pg_start_backup() gets that info so if it passes it back to
> > > pg_stop_backup() that could be enough. Or as was proposed above, it just
> >
> > Doesn't pg_start_backup already return this?
> >
> > SELECT pg_start_backup('test');
> > pg_start_backup
> > -----------------
> > --> 0/2000028
>
> It does, though after looking at the code I think we need the entire
> backup_label. For any of this to be useful, pg_start_backup() *must* return
> backup_label anyway so it can be stored somewhere the backup software can
> find it.
Sure, sounds good to me.
> > > Here's a thought. What if we just stored the oldest starting LSN and a count
> > > of how many backups have been requested. When the backup ends it checks that
> > > backup count is > 0 and starting LSN is <= its starting LSN. If not, it
> > > throws an error. When backups go to 0 FPWs are turned off if they were off
> > > before the first backup.
> >
> > Can't we just error out of an exclusive-style backup is requested to
> > start and a previous exclusive-style backup has not been stopped?
>
> That means only allowing one exclusive backup but it's not like we don't
> already have that limitation. But -- I'd rather not even need to specify
> exclusive/non-exclusive when the backup is started. Basically, all backups
> would be non-exclusive but we'd allow pg_stop_backup() to be called in a new
> session (or the same session).
OK, however you want.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
From | Date | Subject | |
---|---|---|---|
Next Message | Sanaba, Bilva | 2020-07-01 21:41:12 | Adding Support for Copy callback functionality on COPY TO api |
Previous Message | Justin Pryzby | 2020-07-01 21:24:52 | Re: proposal: possibility to read dumped table's name from file |