Re: Remove Deprecated Exclusive Backup Mode

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 20:32:48
Message-ID: 20200701203248.GD14470@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

> 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?

--
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2020-07-01 20:33:54 Re: max_slot_wal_keep_size and wal_keep_segments
Previous Message Stephen Frost 2020-07-01 20:32:46 Re: POC: rational number type (fractions)