Re: Regarding experiencing

From: Blessy Thomas <blessy456bthomas(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Regarding experiencing
Date: 2025-02-11 11:12:52
Message-ID: CAJyyjtBOjgUHmavCbzodgtXGSuPXmw7Ee40cDUTbAutBBWix9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Thank you for the clarification. Now this explains the scenario.
Regards
Blessy Thomas

On Tue, 11 Feb 2025 at 15:56, Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
wrote:

> 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/
>

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2025-02-11 14:00:10 Second paragraph a little bit misleading
Previous Message Álvaro Herrera 2025-02-11 10:25:57 Re: Regarding experiencing