diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-15 17:03:36 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-15 17:03:36 +0000 |
commit | 057ea3471f2e66da5e9d2c017a5484b885c44adf (patch) | |
tree | 27fc5bbb45d2badb442011f33b6c704423c58f5e /src | |
parent | 2820f05ef93574873dfcb03bb5b1841e87d3e6e2 (diff) | |
download | postgresql-057ea3471f2e66da5e9d2c017a5484b885c44adf.tar.gz postgresql-057ea3471f2e66da5e9d2c017a5484b885c44adf.zip |
Xmin calculations should consider only top transaction IDs, and
therefore starting with GetCurrentTransactionId is wrong. Fixes
miscomputation of RecentGlobalXmin leading to bizarre behavior
reported by Gavin Sherry.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/ipc/sinval.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c index 57e39da4a4d..af046a3f1ec 100644 --- a/src/backend/storage/ipc/sinval.c +++ b/src/backend/storage/ipc/sinval.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/ipc/sinval.c,v 1.67 2004/08/01 17:32:16 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/storage/ipc/sinval.c,v 1.68 2004/08/15 17:03:36 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -673,7 +673,7 @@ GetOldestXmin(bool allDbs) TransactionId result; int index; - result = GetCurrentTransactionId(); + result = GetTopTransactionId(); LWLockAcquire(SInvalLock, LW_SHARED); @@ -763,7 +763,7 @@ GetSnapshotData(Snapshot snapshot, bool serializable) errmsg("out of memory"))); } - globalxmin = xmin = GetCurrentTransactionId(); + globalxmin = xmin = GetTopTransactionId(); /* * If we are going to set MyProc->xmin then we'd better get exclusive |