Re: Exposing the lock manager's WaitForLockers() to SQL

Поиск
Список
Период
Сортировка
От Marco Slot
Тема Re: Exposing the lock manager's WaitForLockers() to SQL
Дата
Msg-id CAFMSG9EZMiS36nhYh+EptoHdpQLx=En5vexY8VDsntYiu5i33w@mail.gmail.com
обсуждение исходный текст
Ответ на Exposing the lock manager's WaitForLockers() to SQL  (Will Mortensen <will@extrahop.com>)
Ответы Re: Exposing the lock manager's WaitForLockers() to SQL  (Will Mortensen <will@extrahop.com>)
Re: Exposing the lock manager's WaitForLockers() to SQL  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Dec 23, 2022 at 11:43 AM Will Mortensen <will@extrahop.com> wrote:
> We'd like to be able to call the lock manager's WaitForLockers() and
> WaitForLockersMultiple() from SQL. Below I describe our use case, but
> basically I'm wondering if this:
>
>     1. Seems like a reasonable thing to do
>
>     2. Would be of interest upstream
>
>     3. Should be done with a new pg_foo() function (taking an
>        oid?), or a whole new SQL command, or something else

Definitely +1 on adding a function/syntax to wait for lockers without
actually taking a lock. The get sequence value + lock-and-release
approach is still the only reliable scheme I've found for reliably and
efficiently processing new inserts in PostgreSQL. I'm wondering
whether it could be an option of the LOCK command. (LOCK WAIT ONLY?)

Marco



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

Предыдущее
От: Maxim Orlov
Дата:
Сообщение: Re: Add SHELL_EXIT_CODE to psql
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Collation version tracking for macOS