Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I suppose we could allow one backend to mark the page with a shared lock
> for primary key purposes while others read it. Does that buy us
> anything?
That doesn't work, unless you insist that the first backend can't exit
its transaction until all the other ones are done. Which introduces its
own possibilities for deadlock --- but even worse, how does the first
backend *know* that the other ones are done? You're right back where
you started: it has to be possible to tell which backends have
share-locked a particular row.
regards, tom lane