Re: non-exclusive backup cleanup is mildly broken

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: non-exclusive backup cleanup is mildly broken
Date: 2019-12-13 08:56:49
Message-ID: CABUevEzZcRc6SCBVDBBBt46OmUh3+P3w+aTKC6NSuB5rfHt-tw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 13, 2019 at 9:00 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> On Thu, Dec 12, 2019 at 01:52:31PM +0100, Magnus Hagander wrote:
> > On Thu, Dec 12, 2019 at 5:58 AM Kyotaro Horiguchi <
> horikyota(dot)ntt(at)gmail(dot)com>
> > wrote:
>
> > My first reaction would be to just disallow the combination of prepared
> > transactions and start/stop backups. But looking at it it seems like an
> > unnecessary restriction and an approach like this one seems better.
>
> I think that's a bad idea to put a restriction of this kind. There
> are large consumers of 2PC, and everybody needs backups.
>

You misunderstood me. I certainly didn't mean that people who use 2PC
shouldn't be able to use proper backups -- that would be *terrible*.

I meant disallowing pg_start_backup() in a session that had a prepared
transaction, and disallowing preparing a transaction in a session with an
ongoing backup. They would still work perfectly fine in *other* parallel
sessions.

That said, being able to do it in the session itself is of course even
better.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jean-Christophe Arnu 2019-12-13 09:09:53 Re: PITR on DROP DATABASE, deleting of the database directory despite the recovery_target_time set before.
Previous Message Michael Paquier 2019-12-13 08:00:33 Re: non-exclusive backup cleanup is mildly broken