Re: Improve LWLock tranche name visibility across backends
От | Sami Imseih |
---|---|
Тема | Re: Improve LWLock tranche name visibility across backends |
Дата | |
Msg-id | CAA5RZ0uYpXw8yTpCPiDAvwt9WtXesKM_vebbCjBm4MQBVnchMw@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:59:41PM -0500, Sami Imseih wrote: > > 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. > > We probably want to hold a lock while we 1) increment LWLockCounter and > copy a new tranche name to memory and In the last rev, I removed the spinlock acquired on ShmemLock in-lieu of a LWLock. This is because I wanted a single LWLock acquisition while both incrementing LWLockCounter and writing to shared memory, and doing this much work, particularly writing to shared memory, with a spinlock seemed inappropriate. With that said, this is not high concurrency of performance sensitive activity at all, so perhaps I was being overly paranoid. -- Sami
В списке pgsql-hackers по дате отправления: