Re: Something else about Redo Logs disappearing

From: Peter <pmc(at)citylink(dot)dinoex(dot)sub(dot)org>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Something else about Redo Logs disappearing
Date: 2020-06-15 17:00:54
Message-ID: 20200615170054.GA78081@gate.oper.dinoex.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 15, 2020 at 03:19:29PM +0200, Laurenz Albe wrote:
! On Mon, 2020-06-15 at 14:50 +0200, Peter wrote:
! > ! An example:
! > !
! > ! - Backup #1 calls "pgpre.sh"
! > ! - Backup #1 starts copying files
! > ! - Backup #2 calls "pgpre.sh".
! > ! This will cancel the first backup.
! > ! - Backup #1 completes copying files.
! > ! - Backup #1 calls "pgpost.sh".
! > ! It will receive an error.
! > ! So it has to invalidate the backup.
! > ! - Backup #2 completes copying files.
! > ! - Backup #2 calls "pgpost.sh".
! > ! It gets a "backup_label" file and completes the backup.
! >
! > That's not true.
!
! Ah, yes, you are right.

Thank You.

! Since "pgpre.sh" and "pgpost.sh" are independent, there
! is no way to tell which of them belongs to which other.

Correct.

! So calling "pgpost.sh" indeed ends the most recently started
! backup and returns "backup_label" accordingly.
!
! That means: the caller of the scripts has to make sure
! not to start a second backup while the first one is running.

Never run two backups in parallel with such an approach, exactly.

And that is one of a couple of likely pitfalls I perceived when
looking at that new API.

We could fix that, but that will then get more complicated - and
people will usually not do that. And that's why I consider that
new API as rather dangerous.

cheerio,
PMc

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2020-06-15 18:01:00 Re: Index no longer being used, destroying and recreating it restores use.
Previous Message Ron Clarke 2020-06-15 15:44:39 Re: Assigning values to a range in Pgsql and inclusive / exclusive bounds