forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbe9788e
committed
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 sharedsync_standbys_defined flag and operate the sync replication wait-queue.On the other hand, when the flag is false, the lock is not necessarybecause the wait-queue is not touched. But due to the changes bycommit48c9f49, previously the lock was taken whatever the flag was.This could cause unnecessary performance overhead in every transactioncommit time. Therefore this commit avoids that unnecessary aquisitionof SyncRepLock.Author: Fujii MasaoReviewed-by: Asim Praveen, Masahiko Sawada,Discussion:https://postgr.es/m/20200406050332.nsscfqjzk2d57zyx@alap3.anarazel.de1 parent05c16b8 commitbe9788e
1 file changed
+18
-6
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
161 | 179 |
| |
162 | 180 |
| |
163 | 181 |
| |
164 | 182 |
| |
165 | 183 |
| |
166 | 184 |
| |
167 |
| - | |
168 |
| - | |
169 |
| - | |
170 |
| - | |
171 |
| - | |
172 |
| - | |
173 | 185 |
| |
174 | 186 |
| |
175 | 187 |
| |
|
0 commit comments
Comments
(0)