From: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
To: Andres Freund <andres@anarazel.de>
Cc: Amul Sul <sulamul@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Subject: Re: [patch] demote
Date: Tue, 14 Jul 2020 23:16:34 +0200
Message-ID: <20200714231634.7cad6815@firost> (raw)
In-Reply-To: <20200714194951.rzn5yohwwgdo733q@alap3.anarazel.de>
References: <20200617174451.222078b4@firost>
<20200625192754.3e105cfc@firost>
<20200703001210.7897b1a9@firost>
<20200713170449.7a2c58b0@firost>
<CAAJ_b94Adr3Kyu9JzQX69NfgN1bV8BON_VbJEPDUwcA=zzjnDA@mail.gmail.com>
<20200714194951.rzn5yohwwgdo733q@alap3.anarazel.de>
On Tue, 14 Jul 2020 12:49:51 -0700
Andres Freund <andres@anarazel.de> wrote:
> Hi,
>
> On 2020-07-14 17:26:37 +0530, Amul Sul wrote:
> > On Mon, Jul 13, 2020 at 8:35 PM Jehan-Guillaume de Rorthais
> > <jgdr@dalibo.com> wrote:
> > >
> > > Hi,
> > >
> > > Another summary + patch + tests.
> > >
> > > This patch supports 2PC. The goal is to keep them safe during
> > > demote/promote actions so they can be committed/rollbacked later on a
> > > primary. See tests.
> >
> > Wondering is it necessary to clear prepared transactions from shared memory?
> > Can't simply skip clearing and restoring prepared transactions while
> > demoting?
>
> Recovery doesn't use the normal PGXACT/PGPROC mechanisms to store
> transaction state. So I don't think it'd be correct to leave them around
> in their previous state. We'd likely end up with incorrect snapshots
> if a demoted node later gets promoted...
Indeed. I experienced it while debugging. PGXACT/PGPROC/locks need to
be cleared.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: jgdr@dalibo.com, andres@anarazel.de, sulamul@gmail.com, pgsql-hackers@lists.postgresql.org, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, masao.fujii@oss.nttdata.com
Subject: Re: [patch] demote
In-Reply-To: <20200714231634.7cad6815@firost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox