1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Remove AMI_OVERRIDE tests from tqual.c routines; they aren't necessary

and just slow down normal operations (only fractionally, but a cycle saved
is a cycle earned).  Improve documentation of AMI_OVERRIDE behavior.
This commit is contained in:
Tom Lane
2002-05-25 20:00:12 +00:00
parent 29737d83d9
commit 4d567013cf
5 changed files with 41 additions and 51 deletions

View File

@@ -16,7 +16,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.53 2002/05/24 18:57:56 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.54 2002/05/25 20:00:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -202,9 +202,6 @@ HeapTupleSatisfiesItself(HeapTupleHeader tuple)
bool
HeapTupleSatisfiesNow(HeapTupleHeader tuple)
{
if (AMI_OVERRIDE)
return true;
if (!(tuple->t_infomask & HEAP_XMIN_COMMITTED))
{
if (tuple->t_infomask & HEAP_XMIN_INVALID)
@@ -375,9 +372,6 @@ HeapTupleSatisfiesUpdate(HeapTuple htuple, CommandId curcid)
{
HeapTupleHeader tuple = htuple->t_data;
if (AMI_OVERRIDE)
return HeapTupleMayBeUpdated;
if (!(tuple->t_infomask & HEAP_XMIN_COMMITTED))
{
if (tuple->t_infomask & HEAP_XMIN_INVALID)
@@ -509,9 +503,6 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple)
SnapshotDirty->xmin = SnapshotDirty->xmax = InvalidTransactionId;
ItemPointerSetInvalid(&(SnapshotDirty->tid));
if (AMI_OVERRIDE)
return true;
if (!(tuple->t_infomask & HEAP_XMIN_COMMITTED))
{
if (tuple->t_infomask & HEAP_XMIN_INVALID)
@@ -639,9 +630,6 @@ HeapTupleSatisfiesDirty(HeapTupleHeader tuple)
bool
HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, Snapshot snapshot)
{
if (AMI_OVERRIDE)
return true;
/* XXX this is horribly ugly: */
if (ReferentialIntegritySnapshotOverride)
return HeapTupleSatisfiesNow(tuple);