From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: StandbyRecoverPreparedTransactions recovers subtrans links incorrectly
Date: Tue, 25 Apr 2017 11:28:48 -0400
Message-ID: <18171.1493134128@sss.pgh.pa.us> (raw)
In-Reply-To: <CANP8+j+vvXmruL_i2buvdhMeVv5TQu0Hm2+C5N+kdVwHJuor8w@mail.gmail.com>
References: <20110.1492905318@sss.pgh.pa.us>
<CANP8+j+j_5FjeuSz4OUF1=6FnKiMN5bA9xoZD8LUR-swrNx3kA@mail.gmail.com>
<357.1492964232@sss.pgh.pa.us>
<CANP8+j+vvXmruL_i2buvdhMeVv5TQu0Hm2+C5N+kdVwHJuor8w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Simon Riggs <simon@2ndquadrant.com> writes:
> I can't see any reason now why overwriteOK should exist at all. I'm
> guessing that the whole "overwriteOK" idea was an incorrect response
> to xids appearing where they shouldn't have done because of the
> mistake you just corrected. So I will now remove the parameter from
> the call.
Seems reasonable, but I don't like the logic change you made in
SubTransSetParent; you broke the former invariant, for non-Assert
builds, that the target pg_subtrans entry is guaranteed to have
the correct value on exit. I do like fixing it to not dirty the
page unnecessarily, but I'd suggest that we write it like
if (*ptr != parent)
{
Assert(*ptr == InvalidTransactionId);
*ptr = parent;
SubTransCtl->shared->page_dirty[slotno] = true;
}
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, simon@2ndquadrant.com
Subject: Re: StandbyRecoverPreparedTransactions recovers subtrans links incorrectly
In-Reply-To: <18171.1493134128@sss.pgh.pa.us>
References: <20110.1492905318@sss.pgh.pa.us> <CANP8+j+j_5FjeuSz4OUF1=6FnKiMN5bA9xoZD8LUR-swrNx3kA@mail.gmail.com> <357.1492964232@sss.pgh.pa.us> <CANP8+j+vvXmruL_i2buvdhMeVv5TQu0Hm2+C5N+kdVwHJuor8w@mail.gmail.com> <18171.1493134128@sss.pgh.pa.us>
* 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