Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order
Date
Msg-id 407d949e0910261058v476ac5f4id4c84724af0dc89e@mail.gmail.com
Whole thread Raw
In response to Endgame for all those SELECT FOR UPDATE changes: fix plan node order  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order
List pgsql-hackers
On Sun, Oct 25, 2009 at 7:34 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> All that we have to do to fix the first one is to put the LockRows node
> below the Limit node instead of above it.  The solution for the second
> one is to also put LockRows underneath the Sort node, and to regard its
> output as unsorted so that a Sort node will certainly be generated.
> (This in turn implies that we should prefer the cheapest-total plan
> for the rest of the query.)

I'm not following how this would work. Would it mean that every record
would end up being locked?


--
greg


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Scaling up deferred unique checks and the after trigger queue
Next
From: Tom Lane
Date:
Subject: Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order