Re: deadlock problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dustin Sallings <dustin+pgsql(at)spy(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: deadlock problem
Date: 2002-02-26 00:13:51
Message-ID: 25779.1014682431@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dustin Sallings <dustin+pgsql(at)spy(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dustin Sallings 2002-02-26 00:55:22 Re: deadlock problem
Previous Message Jason Earl 2002-02-25 23:59:36 Re: scaling a database