pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Maxim Boguk <maxim.boguk@gmail.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Jeremy Finzel <finzelj@gmail.com>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Date: Thu, 24 May 2018 13:30:56 -0700
Message-ID: <20180524203054.k7lnxjbe2unfvsgm@alap3.anarazel.de> (raw)
In-Reply-To: <20180524170853.gmep4arwx7i5m5o3@alvherre.pgsql>
References: <CAK-MWwQ4yDGkosbg0hTdDySc3ikLeqv5FtHv2TGKGcX0XbpN-w@mail.gmail.com>
	<20180524170853.gmep4arwx7i5m5o3@alvherre.pgsql>

On 2018-05-24 13:08:53 -0400, Alvaro Herrera wrote:
> Hmm .. surely
> 
> diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
> index 5016181fd7..5d7fa1fb45 100644
> --- a/src/backend/access/heap/heapam.c
> +++ b/src/backend/access/heap/heapam.c
> @@ -6690,7 +6690,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple,
>  	xid = HeapTupleHeaderGetXmin(tuple);
>  	xmin_frozen = ((xid == FrozenTransactionId) ||
>  				   HeapTupleHeaderXminFrozen(tuple));
> -	if (TransactionIdIsNormal(xid))
> +	if (!xmin_frozen && TransactionIdIsNormal(xid))
>  	{
>  		if (TransactionIdPrecedes(xid, relfrozenxid))
>  			ereport(ERROR,
> 
> 
> ??

I don't think that's necesary - HeapTupleHeaderGetXmin() returns
FrozenTransactionId if the tuple is frozen (note the
HeapTupleHeaderXminFrozen() within).

Greetings,

Andres Freund




view thread (78+ messages)  latest in thread

Message-ID: <20180524203054.k7lnxjbe2unfvsgm@alap3.anarazel.de>
Permalink:  ../20180524203054.k7lnxjbe2unfvsgm@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20180524203054.k7lnxjbe2unfvsgm@alap3.anarazel.de

 · 

reply

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-general@postgresql.org
  Cc: andres@anarazel.de, alvherre@2ndquadrant.com, maxim.boguk@gmail.com, pg@bowt.ie, finzelj@gmail.com
  Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
  In-Reply-To: <20180524203054.k7lnxjbe2unfvsgm@alap3.anarazel.de>
  References: <CAK-MWwQ4yDGkosbg0hTdDySc3ikLeqv5FtHv2TGKGcX0XbpN-w@mail.gmail.com> <20180524170853.gmep4arwx7i5m5o3@alvherre.pgsql> <20180524203054.k7lnxjbe2unfvsgm@alap3.anarazel.de>

* 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