diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2017-03-24 14:20:59 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2017-03-24 14:20:59 +0000 |
commit | 42b4b0b2413b9b472aaf2112a3bbfd80a6ab4dc5 (patch) | |
tree | 3e40c73b0fcbc2faac1d468e21001514572bd3b1 /src/backend/access | |
parent | 8398c836892fde2b99139cc4711e57b7e59582b6 (diff) | |
download | postgresql-42b4b0b2413b9b472aaf2112a3bbfd80a6ab4dc5.tar.gz postgresql-42b4b0b2413b9b472aaf2112a3bbfd80a6ab4dc5.zip |
Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
For normal commits and aborts we already reset PgXact->xmin
Avoiding touching highly contented shmem improves concurrent
performance.
Simon Riggs
Discussion: CANP8+jJdXE9b+b9F8CQT-LuxxO0PBCB-SZFfMVAdp+akqo4zfg@mail.gmail.com
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/transam/xact.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index c8751c697d4..cc11177bce0 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -2137,7 +2137,7 @@ CommitTransaction(void) AtEOXact_ComboCid(); AtEOXact_HashTables(true); AtEOXact_PgStat(true); - AtEOXact_Snapshot(true); + AtEOXact_Snapshot(true, false); AtCommit_ApplyLauncher(); pgstat_report_xact_timestamp(0); @@ -2409,7 +2409,7 @@ PrepareTransaction(void) AtEOXact_ComboCid(); AtEOXact_HashTables(true); /* don't call AtEOXact_PgStat here; we fixed pgstat state above */ - AtEOXact_Snapshot(true); + AtEOXact_Snapshot(true, true); pgstat_report_xact_timestamp(0); CurrentResourceOwner = NULL; @@ -2640,7 +2640,7 @@ CleanupTransaction(void) * do abort cleanup processing */ AtCleanup_Portals(); /* now safe to release portal memory */ - AtEOXact_Snapshot(false); /* and release the transaction's snapshots */ + AtEOXact_Snapshot(false, false); /* and release the transaction's snapshots */ CurrentResourceOwner = NULL; /* and resource owner */ if (TopTransactionResourceOwner) |