Re: pg_locks-exclusivelock for select queries - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_locks-exclusivelock for select queries
Date
Msg-id 899843.1711117130@sss.pgh.pa.us
Whole thread Raw
In response to pg_locks-exclusivelock for select queries  (arun chirappurath <arunsnmimt@gmail.com>)
List pgsql-general
arun chirappurath <arunsnmimt@gmail.com> writes:
> I am running below query on a database. why is it creating a exclusive lock
> on a virtualxid?  I am running some SELECT queries and its creating an
> ExclusiveLock in virtualxid? is this normal?

Yes.  That lock has nothing to do with any table, only with the
transaction's own existence.  It can't conflict when acquired,
because the virtual XID is unique (at least across existing sessions).
It exists so that other sessions can wait for this one if needful, by
trying to take share lock on the virtualxid.

            regards, tom lane



pgsql-general by date:

Previous
From: Nick Renders
Date:
Subject: Re: could not open file "global/pg_filenode.map": Operation not permitted
Next
From: Adrian Klaver
Date:
Subject: Re: could not open file "global/pg_filenode.map": Operation not permitted