Re: POC: make mxidoff 64 bits

Поиск
Список
Период
Сортировка
От Pavel Borisov
Тема Re: POC: make mxidoff 64 bits
Дата
Msg-id CALT9ZEG4OoQk8OUBCNY8cT3GuUvcQ0NrphHZ9H8--VjwM5VWUw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: POC: make mxidoff 64 bits  (Pavel Borisov <pashkin.elfe@gmail.com>)
Список pgsql-hackers

On Thu, 12 Sept 2024 at 16:09, Pavel Borisov <pashkin.elfe@gmail.com> wrote:
Hi, Maxim!

Previously we accessed offsets in shared MultiXactState without locks as 32-bit read is always atomic. But I'm not sure it's so when offset become 64-bit.
E.g. GetNewMultiXactId():

nextOffset = MultiXactState->nextOffset;
is outside lock. 

There might be other places we do the same as well. 
I think the replacement of plain assignments by pg_atomic_read_u64/pg_atomic_write_u64 would be sufficient.

(The same I think is needed for the patchset [1])

Regards,
Pavel Borisov

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