Re: Regarding experiencing

Поиск
Список
Период
Сортировка
От Álvaro Herrera
Тема Re: Regarding experiencing
Дата
Msg-id 202502111025.yhnpf7xy4bqz@alvherre.pgsql
обсуждение исходный текст
Ответ на Regarding experiencing  (PG Doc comments form <noreply@postgresql.org>)
Ответы Re: Regarding experiencing
Список pgsql-docs
On 2025-Feb-11, Blessy Thomas wrote:

> These are the  commands I have run in the terminal
> psql (17.0)
> Type "help" for help.
> 
> postgres=# SELECT pg_advisory_lock_shared(1001); //initialising the shared
> lock
>  pg_advisory_lock_shared
> -------------------------
> 
> (1 row)
> 
> postgres=# SELECT pg_advisory_lock(1001); //exclusive lock
>  pg_advisory_lock
> ------------------
> 
> (1 row)

Ah yes, there's no conflict in this case because the holder of both
locks is the same session.  You'd have to request the exclusive lock in
another psql session and you should see it block.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



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