Re: getting rid of SnapshotNow

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: getting rid of SnapshotNow
Date: 2013-08-05 15:17:08
Message-ID: 20130805151708.GB1654@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-odbc

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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-08-05 15:22:28 Re: getting rid of SnapshotNow
Previous Message Stephen Frost 2013-08-05 14:01:46 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])

Browse pgsql-odbc by date

  From Date Subject
Next Message Andres Freund 2013-08-05 15:22:28 Re: getting rid of SnapshotNow
Previous Message Barry Bell 2013-08-05 14:39:16 ODBC asci characters 128-159 with ANSI driver