Re: Need help understanding pg_locks - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Need help understanding pg_locks
Date
Msg-id 4E1AD8BB020000250003F1A3@gw.wicourts.gov
Whole thread Raw
In response to Re: Need help understanding pg_locks  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> wrote:
> OK, so as I understand it, in pg_locks:
> 
>          Column       |   Type   | Modifiers
>   --------------------+----------+-----------
>    locktype           | text     |
>    database           | oid      |
>    relation           | oid      |
>    page               | integer  |
>    tuple              | smallint |
>    virtualxid         | text     |
>    transactionid      | xid      |
>    classid            | oid      |
>    objid              | oid      |
>    objsubid           | smallint |
> 
>    virtualtransaction | text     |
>    pid                | integer  |
>    mode               | text     |
>    granted            | boolean  |
> 
> It is the last four that are related to the "locking entity".
> vaguely represented the locked object.
I think more accurately:
Information about the lock requester:
virtualtransaction, pid
Information about what is being locked:
database, relation, page, tuple, virtualxid, transactionid, classid,
objid, objsubid (where NULL means "not applicable to this lock)
Information about the lock itself:
locktype, mode, granted
-Kevin


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: remove README.mb.jp and README.mb.big5?
Next
From: Robert Haas
Date:
Subject: Re: Select For Update and Left Outer Join