Re: ExclusiveLock without a relation in pg_locks - Mailing list pgsql-general

From Michael Fuhr
Subject Re: ExclusiveLock without a relation in pg_locks
Date
Msg-id 20060223183616.GA43646@winnie.fuhr.org
Whole thread Raw
In response to Re: ExclusiveLock without a relation in pg_locks  ("Carlos Oliva" <carlos@pbsinet.com>)
Responses Re: ExclusiveLock without a relation in pg_locks  ("Carlos Oliva" <carlos@pbsinet.com>)
List pgsql-general
On Thu, Feb 23, 2006 at 01:23:36PM -0500, Carlos Oliva wrote:
> Yes.  I am seeing that situation often in our database.
>
> The query field of pg_stat_activity is SELECT ..., not SLECT UPDATE or
> UPDATE or INSERT or DELETE.  I was expecting the query to say something like
> SLECT UPDATE or something like that.  Also the query seems to have just
> columns in the select statement; not functions.
>
> I will look further into these queries in case that they are using
> functions.

Are the ExclusiveLock locks for relations or for transaction IDs?
Also, once a lock is acquired it's held until the transaction
completes, so if the transaction ever acquired that lock then the
transaction would still be holding it.

If you can't figure out what's happening then it might be useful
to see the output of

SELECT relation::regclass, * FROM pg_locks;

A self-contained test case might also be useful.  If you show what
commands you're running and what pg_locks output you don't understand,
then somebody might be able to explain what's happening.

--
Michael Fuhr

pgsql-general by date:

Previous
From: "Rodrigo Sakai"
Date:
Subject: Temporal Databases
Next
From: "Harald Armin Massa"
Date:
Subject: Error correction to FAQ