Re: What causes lock?? - Mailing list pgsql-general

From Tom Lane
Subject Re: What causes lock??
Date
Msg-id 8365.1123250974@sss.pgh.pa.us
Whole thread Raw
In response to Re: What causes lock??  (Frank Miles <fpm@u.washington.edu>)
List pgsql-general
Frank Miles <fpm@u.washington.edu> writes:
> ... By the way, in this forced condition, the rows that show granted='f'
> have blank relname, relation, and database fields :(

Those would be locks on transaction IDs, which is what you see in
pg_locks when someone is blocked on a row-level lock.  (For reasons
of implementation efficiency, we don't record individual row locks
in a way that lets pg_locks see them :-()

This is definitely theorizing in advance of the evidence, but
I'm betting that your problem is due to locking of rows referenced
by foreign keys.  Did you recently add some foreign key constraints
to your database?

            regards, tom lane

pgsql-general by date:

Previous
From: Laura Vance
Date:
Subject: Re: Going beyond sql
Next
From: Bricklen Anderson
Date:
Subject: Re: How to write jobs in postgresql