Re: getting rid of SnapshotNow - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: getting rid of SnapshotNow
Date
Msg-id 20130805151708.GB1654@momjian.us
Whole thread Raw
In response to Re: getting rid of SnapshotNow  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: getting rid of SnapshotNow  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Thu, Jul 25, 2013 at 07:24:53PM -0400, Robert Haas wrote:
> -        /* Used by pre-9.0 binary upgrades */
> -        if (tuple->t_infomask & HEAP_MOVED_OFF)
> -        {
> -            TransactionId xvac = HeapTupleHeaderGetXvac(tuple);
> -
> -            if (TransactionIdIsCurrentTransactionId(xvac))
> -                return false;
> -            if (!TransactionIdIsInProgress(xvac))
> -            {
> -                if (TransactionIdDidCommit(xvac))
> -                {
> -                    SetHintBits(tuple, buffer, HEAP_XMIN_INVALID,
> -                                InvalidTransactionId);
> -                    return false;
> -                }
> -                SetHintBits(tuple, buffer, HEAP_XMIN_COMMITTED,
> -                            InvalidTransactionId);
> -            }
> -        }
> -        /* Used by pre-9.0 binary upgrades */
> -        else if (tuple->t_infomask & HEAP_MOVED_IN)
> -        {
> -            TransactionId xvac = HeapTupleHeaderGetXvac(tuple);
> -
> -            if (!TransactionIdIsCurrentTransactionId(xvac))
> -            {
> -                if (TransactionIdIsInProgress(xvac))
> -                    return false;
> -                if (TransactionIdDidCommit(xvac))
> -                    SetHintBits(tuple, buffer, HEAP_XMIN_COMMITTED,
> -                                InvalidTransactionId);
> -                else
> -                {
> -                    SetHintBits(tuple, buffer, HEAP_XMIN_INVALID,
> -                                InvalidTransactionId);
> -                    return false;
> -                }
> -            }
> -        }

One interesting aspect of this patch is that the backend code is no
longer even checking HEAP_MOVED_OFF and HEAP_MOVED_IN.  However, we
can't reuse those bits because they could be set from pre-9.0 rows.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Next
From: Andres Freund
Date:
Subject: Re: getting rid of SnapshotNow