LWLocks in DSM memory

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема LWLocks in DSM memory
Дата
Msg-id CAEepm=3+0pVfi0NisEJndj_SBYcA_xYPgWBikqRQVm+s68GA3w@mail.gmail.com
обсуждение исходный текст
Ответы Re: LWLocks in DSM memory  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
Hi,

As already noted[1], LWLocks don't currently work in DSM segments,
because they use dlist for the list of waiters.  Even though all of
the waiter nodes are in PGPROC and therefore have stable addresses,
the dlist code internally constructs a circular list including
pointers to a special sentinel node inside the dlist_head object, and
those pointers may be invalid in other backends.

One solution could be to provide a non-circular variant of the dlist
interface that uses NULL list termination.  I've attached a quick
sketch of something like that which seems to work correctly.  It is
only lightly tested so far and probably buggy, but shows the general
idea.

Any thoughts on this approach, or better ways to solve this problem?
How valuable is the branch-free property of the circular push and
delete operations?

[1] https://www.postgresql.org/message-id/CA+Tgmobjia49CCJ0ZazbWaVv7nKgYt+1Zo5CwxkH9Aahgn2vPg@mail.gmail.com

--
Thomas Munro
http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: AdvanceXLInsertBuffer vs. WAL segment compressibility
Следующее
От: Anton Dignös
Дата:
Сообщение: Re: [PROPOSAL] Temporal query processing with range types