Re: deadlock problem - Mailing list pgsql-general

From Tom Lane
Subject Re: deadlock problem
Date
Msg-id 25779.1014682431@sss.pgh.pa.us
Whole thread Raw
In response to deadlock problem  (Dustin Sallings <dustin+pgsql@spy.net>)
Responses Re: deadlock problem  (Dustin Sallings <dustin+pgsql@spy.net>)
List pgsql-general
Dustin Sallings <dustin+pgsql@spy.net> writes:
>     It's not clear to me why this should deadlock.  I don't believe
> any of the async log events that were being recorded were referencing the
> new ID (and if they were, I'd think they'd fire an RI violation).

When you insert a new row into a table that has RI references, the
referenced rows in the other table are locked down with SELECT FOR
UPDATE locks (to ensure they won't be deleted before your own
transaction can commit).  I am not sure that this could explain your
deadlock, but it seems like the first place to look.

            regards, tom lane

pgsql-general by date:

Previous
From: Jason Earl
Date:
Subject: Re: scaling a database
Next
From: Dustin Sallings
Date:
Subject: Re: deadlock problem