pgsql: Avoid unnecessary acquisition of SyncRepLock in transaction comm
В списке pgsql-committers по дате отправления:
| От | Fujii Masao |
|---|---|
| Тема | pgsql: Avoid unnecessary acquisition of SyncRepLock in transaction comm |
| Дата | |
| Msg-id | E1kDI0j-0003VF-1C@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/be9788e9989a0744ba60ab100153340fd123b786 Modified Files -------------- src/backend/replication/syncrep.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера