diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2010-12-08 18:48:03 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2010-12-08 18:48:03 +0000 |
commit | e620ee35b249b0af255ef788003d1c9edb815a35 (patch) | |
tree | e8b04c9426be8a7abdb95c69b97b6b9f17513bf1 /src/backend/access/transam/xact.c | |
parent | 5a031a5556ff83b8a9646892715d7fef415b83c3 (diff) | |
download | postgresql-e620ee35b249b0af255ef788003d1c9edb815a35.tar.gz postgresql-e620ee35b249b0af255ef788003d1c9edb815a35.zip |
Optimize commit_siblings in two ways to improve group commit.
First, avoid scanning the whole ProcArray once we know there
are at least commit_siblings active; second, skip the check
altogether if commit_siblings = 0.
Greg Smith
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r-- | src/backend/access/transam/xact.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index d2e2e119970..79c9c0d8446 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -1052,7 +1052,7 @@ RecordTransactionCommit(void) * fewer than CommitSiblings other backends with active transactions. */ if (CommitDelay > 0 && enableFsync && - CountActiveBackends() >= CommitSiblings) + MinimumActiveBackends(CommitSiblings)) pg_usleep(CommitDelay); XLogFlush(XactLastRecEnd); |