Re: PL/PgSQL, Inheritance, Locks, and Deadlocks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas F(dot)O'Connell" <tfo(at)sitening(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: PL/PgSQL, Inheritance, Locks, and Deadlocks
Date: 2005-02-02 15:41:27
Message-ID: 28778.1107358887@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Thomas F.O'Connell" <tfo(at)sitening(dot)com> writes:
> The linking table is a pure linking table. It has a user_id and a
> group_id, each a foreign key. The user_id ties to the appropriate
> subclass user table. The group_id ties to the groups table, which is
> not part of an inheritance hierarchy. A multicolumn primary key covers
> both foreign keys in the linking table, and the secondary column of the
> key also has its own index.

Inserts/updates in a table that has a foreign key result in locks on the
referenced rows in the master table. Could this explain your problem?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-02-02 15:50:55 Re: query time
Previous Message Tom Lane 2005-02-02 15:37:40 Re: Does indexing help >= as well as = for integer columns?