From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Wood, Dan <hexpert@amazon.com>
Subject: Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
Date: Wed, 4 Oct 2017 14:06:09 +0200
Message-ID: <20171004120609.kuf2wtyu6osdfpxm@alvherre.pgsql> (raw)
In-Reply-To: <20171004094057.2ogpt36lvuanoe5f@alvherre.pgsql>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Alvaro Herrera wrote:
> Peter Geoghegan wrote:
>
> > I thought that we no longer store FrozenTransactionId (xid 2) as our
> > "raw" xmin while freezing, and yet that's what we see here.
>
> I'm doing this in 9.3. I can't tell if the new tuple freezing stuff
> broke things more thoroughly, but it is already broken in earlier
> releases.
In fact, I think in 9.3 we should include this patch, to set the Xmin to
FrozenXid. 9.4 and onwards have commit 37484ad2a "Change the way we
mark tuples as frozen" which uses a combination of infomask bits, but in
9.3 I think leaving the unfrozen value in the xmax field is a bad idea
even if we set the HEAP_XMAX_COMMITTED bit.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackersAttachments:fix-multi-freezing.patch (text/plain, 521B) downloaddiff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.cindex e00dc6c1ca..e68746fc3b 100644--- a/src/backend/access/heap/heapam.c+++ b/src/backend/access/heap/heapam.c@@ -5500,7 +5500,10 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask,
if (TransactionIdPrecedes(xid, cutoff_xid))
{
if (TransactionIdDidCommit(xid))
+ {+ xid = FrozenTransactionId;
*flags = FRM_MARK_COMMITTED | FRM_RETURN_IS_XID;
+ }
else
{
*flags |= FRM_INVALIDATE_XMAX;
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-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org, pg@bowt.ie, pgsql-hackers@postgresql.org, hexpert@amazon.com
Subject: Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple
In-Reply-To: <20171004120609.kuf2wtyu6osdfpxm@alvherre.pgsql>
References: <20171004094057.2ogpt36lvuanoe5f@alvherre.pgsql> <20171004120609.kuf2wtyu6osdfpxm@alvherre.pgsql>
* 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