summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2020-09-02 10:55:55 +0900
committerFujii Masao <fujii@postgresql.org>2020-09-02 10:55:55 +0900
commitbe9788e9989a0744ba60ab100153340fd123b786 (patch)
treeb04a61c98e88b84f2cf27b549a987beb37d5abe9 /src/backend/access/gist/gistxlog.c
parent05c16b827f3ae66ec718e9af49e4d96906fa2ffb (diff)
downloadpostgresql-be9788e9989a0744ba60ab100153340fd123b786.tar.gz
Avoid unnecessary acquisition of SyncRepLock in transaction commit time.
In SyncRepWaitForLSN() routine called in transaction commit time, SyncRepLock is necessary to atomically both check the shared sync_standbys_defined flag and operate the sync replication wait-queue. On the other hand, when the flag is false, the lock is not necessary because the wait-queue is not touched. But due to the changes by commit 48c9f49265, previously the lock was taken whatever the flag was. This could cause unnecessary performance overhead in every transaction commit time. Therefore this commit avoids that unnecessary aquisition of SyncRepLock. Author: Fujii Masao Reviewed-by: Asim Praveen, Masahiko Sawada, Discussion: https://postgr.es/m/20200406050332.nsscfqjzk2d57zyx@alap3.anarazel.de
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions