separating use of SerialSLRULock

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема separating use of SerialSLRULock
Дата
Msg-id 202401291313.qqxzgfnmex7t@alvherre.pgsql
обсуждение исходный текст
Ответы Re: separating use of SerialSLRULock  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Hello

In Dilip's patch to improve SLRU concurrency, there's a requirement to
prevent predicate.c's SLRU control lock from being used to control
access to another shared memory structure, SerialControlData.  This
struct is used to keep track of the areas of the SLRU that are valid.
Dilip just embedded that change into the patch he submitted, but I think
the patch is actually wrong in detail, because it's leaving the
SerialAdd() function unchanged to use SerialSLRULock, which is wrong
because that function depends heavily on the contents of
SerialControlData, and it also modifies it.  So if run concurrently with
the other functions that are using SerialControlLock, the result would
make no sense.

I came up with the attached.  If there are no objections, I'll be
pushing this shortly.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"The Gord often wonders why people threaten never to come back after they've
been told never to return" (www.actsofgord.com)

Вложения

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

Предыдущее
От: torikoshia
Дата:
Сообщение: Re: RFC: Logging plan of the running query
Следующее
От: "Zhijie Hou (Fujitsu)"
Дата:
Сообщение: RE: Synchronizing slots from primary to standby