Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order
Дата
Msg-id
6562.1256573195@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Robert Haas <robertmhaas@gmail.com>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Alvaro Herrera <alvherre@commandprompt.com>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Robert Haas <robertmhaas@gmail.com>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Robert Haas <robertmhaas@gmail.com>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Robert Haas <robertmhaas@gmail.com>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Greg Stark <gsstark@mit.edu>
Re: Endgame for all those SELECT FOR UPDATE changes: fix plan node order Tom Lane <tgl@sss.pgh.pa.us>
I wrote:
> Robert Haas  writes:
>> Could the desired behavior be obtained using a CTE?

> Nope, we push FOR UPDATE into WITHs too.  I don't really see any way to
> deal with this without some sort of semantic changes.

... although on reflection, I'm not sure *why* we push FOR UPDATE into
WITHs.  That seems a bit antithetical to the position we've evolved that
WITH queries are executed independently of the outer query.

If we removed that bit of behavior, which hopefully is too new for much
code to depend on, then the old FOR-UPDATE-last behavior could be
attained via a WITH.  And we'd not have to risk touching the interaction
between plain subqueries and FOR UPDATE, which is something that seems
much more likely to break existing apps.

That seems like a reasonable compromise to me ... any objections?
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: David E. Wheeler
Дата:
FAQ