Re: Improve LWLock tranche name visibility across backends

Поиск
Список
Период
Сортировка
От Sami Imseih
Тема Re: Improve LWLock tranche name visibility across backends
Дата
Msg-id CAA5RZ0vWh2uxG99iUb3P4nsoDLk0x7Yuai83AbbGs3YZvJM8QQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improve LWLock tranche name visibility across backends  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Improve LWLock tranche name visibility across backends
Список pgsql-hackers
> On Mon, Aug 25, 2025 at 04:37:21PM -0500, Sami Imseih wrote:
> > When we lookup from shared array only, we need to take a shared lock
> > every lookup. Acquiring that lock is what I am trying to avoid. You
> > are saying it's not worth optimizing that part, correct?
>
> Why do we need a shared lock here?  IIUC there's no chance that existing
> entries will change.  We'll only ever add new ones to the end.

hmm, can we really avoid a shared lock when reading from shared memory?
considering access for both reads and writes can be concurrent to shared
memory. We are also taking an exclusive lock when writing a new tranche.

--
Sami



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