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

Added global variable to have RI triggers override

time qualification of HeapTupleSatisfiesSnapshot()

Jan
This commit is contained in:
Jan Wieck
1999-12-10 12:34:15 +00:00
parent d31ff14ed8
commit 62c42a05a2
4 changed files with 30 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.32 1999/10/06 21:58:11 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.33 1999/12/10 12:34:14 wieck Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,6 +24,8 @@ Snapshot SnapshotDirty = &SnapshotDirtyData;
Snapshot QuerySnapshot = NULL;
Snapshot SerializableSnapshot = NULL;
bool ReferentialIntegritySnapshotOverride = false;
/*
* XXX Transaction system override hacks start here
*/
@@ -493,6 +495,9 @@ HeapTupleSatisfiesSnapshot(HeapTupleHeader tuple, Snapshot snapshot)
if (AMI_OVERRIDE)
return true;
if (ReferentialIntegritySnapshotOverride)
return HeapTupleSatisfiesNow(tuple);
if (!(tuple->t_infomask & HEAP_XMIN_COMMITTED))
{
if (tuple->t_infomask & HEAP_XMIN_INVALID)
@@ -606,6 +611,9 @@ void
SetQuerySnapshot(void)
{
/* Initialize snapshot overriding to false */
ReferentialIntegritySnapshotOverride = false;
/* 1st call in xaction */
if (SerializableSnapshot == NULL)
{