summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorSimon Riggs2017-04-06 12:31:52 +0000
committerSimon Riggs2017-04-06 12:31:52 +0000
commit6bad580d9e678a0b604883e14d8401d469b06566 (patch)
tree44630ef43002b029704432f405ae2949081eb841 /src/include
parentfd01983594b7d2119653428e3b532578008c7065 (diff)
Avoid SnapshotResetXmin() during AtEOXact_Snapshot()
For normal commits and aborts we already reset PgXact->xmin, so we can simply avoid running SnapshotResetXmin() twice. During performance tests by Alexander Korotkov, diagnosis by Andres Freund showed PgXact array as a bottleneck. After manual analysis by me of the code paths that touch those memory locations, I was able to identify extraneous code in the main transaction commit path. Avoiding touching highly contented shmem improves concurrent performance slightly on all workloads, confirmed by tests run by Ashutosh Sharma and Alexander Korotkov. Simon Riggs Discussion: CANP8+jJdXE9b+b9F8CQT-LuxxO0PBCB-SZFfMVAdp+akqo4zfg@mail.gmail.com
Diffstat (limited to 'src/include')
-rw-r--r--src/include/utils/snapmgr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/utils/snapmgr.h b/src/include/utils/snapmgr.h
index 86c48d9c8ef..2f8d4fd4a0c 100644
--- a/src/include/utils/snapmgr.h
+++ b/src/include/utils/snapmgr.h
@@ -85,7 +85,7 @@ extern void UnregisterSnapshotFromOwner(Snapshot snapshot, ResourceOwner owner);
extern void AtSubCommit_Snapshot(int level);
extern void AtSubAbort_Snapshot(int level);
-extern void AtEOXact_Snapshot(bool isCommit);
+extern void AtEOXact_Snapshot(bool isCommit, bool isPrepare);
extern void ImportSnapshot(const char *idstr);
extern bool XactHasExportedSnapshots(void);