Re: Problem with synchronous replication

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Problem with synchronous replication
Дата
Msg-id 20191031021103.GC2530@paquier.xyz
обсуждение исходный текст
Ответ на Re: Problem with synchronous replication  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: Problem with synchronous replication  (Fujii Masao <masao.fujii@gmail.com>)
Re: Problem with synchronous replication  ("lingce.ldm" <lingce.ldm@alibaba-inc.com>)
Список pgsql-hackers
On Wed, Oct 30, 2019 at 05:43:04PM +0900, Kyotaro Horiguchi wrote:
> At Wed, 30 Oct 2019 17:21:17 +0900, Fujii Masao <masao.fujii@gmail.com> wrote in
>> This change causes every ending backends to always take the exclusive lock
>> even when it's not in SyncRep queue. This may be problematic, for example,
>> when terminating multiple backends at the same time? If yes,
>> it might be better to check SHMQueueIsDetached() again after taking the lock.
>> That is,
>
> I'm not sure how much that harms but double-checked locking
> (releasing) is simple enough for reducing possible congestion here, I
> think.

FWIW, I could not measure any actual difference with pgbench -C, up to
500 sessions and an empty input file (just have one meta-command) and
-c 20.

I have added some comments in SyncRepCleanupAtProcExit(), and adjusted
the patch with the suggestion from Fujii-san.  Any comments?
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Problem with synchronous replication
Следующее
От: Fujii Masao
Дата:
Сообщение: Allow CREATE OR REPLACE VIEW to rename the columns