Re: Deadlock bug

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joel Jacobson <joel(at)gluefinance(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Magnus Hagander <magnus(at)hagander(dot)net>, glue(at)pgexperts(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Deadlock bug
Date: 2010-08-20 19:11:37
Message-ID: 25088.1282331497@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joel Jacobson <joel(at)gluefinance(dot)com> writes:
> I fully agree it must obtain a sharelock on the FK, but I cannot understand
> why it is granted it the first time, but not the second time?

It *isn't* granted it the first time, because it doesn't try to acquire
it the first time. That FK check gets optimized away, while the second
one doesn't. Please reread what I said before.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-20 19:15:04 Re: Version Numbering
Previous Message David E. Wheeler 2010-08-20 19:04:50 Re: Version Numbering