Re: Issue with the PRNG used by Postgres

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Issue with the PRNG used by Postgres
Дата
Msg-id 20240412154527.us65kyrl5jgvp5ok@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Issue with the PRNG used by Postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2024-04-12 09:43:46 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Oh my. There's a workload that completely trivially hits this, without even
> > trying hard. LISTEN/NOTIFY.
> 
> Hm.  Bug in the NOTIFY logic perhaps?

I don't think it's a bug, async.c:SignalBackends() will signal once for every
NOTIFY, regardless of whether the target has already been signaled. You're
certainly right that:

> Sending that many signals can't be good from a performance POV, whether or
> not it triggers spinlock issues.

I wonder if we could switch this to latches, because with latches we'd only
re-send a signal if the receiving end has already processed the signal. Or
alternatively, make procsignal.c do something similar, although that might
take a bit of work to be done race-free.

Greetings,

Andres Freund



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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: post-freeze damage control
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: Issue with the PRNG used by Postgres