Re: Avoiding a deadlock

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Avoiding a deadlock
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B057BDA0A@ntex2010a.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Avoiding a deadlock  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Список pgsql-general
Paul Jungwirth wrote:
>> Out of curiosity: any reason the ORDER BY should be in the subquery? It seems like it ought to be in
> the UPDATE (if that's allowed).
> 
> Hmm, it's not allowed. :-) It's still surprising that you can guarantee the order of a multi-row
> UPDATE by ordering a subquery.

To be honest, I don't think that there is any guarantee for this
to work reliably in all comparable cases, as PostgreSQL does
not guarantee in which order it performs the UPDATEs.

It just happens to work with certain plans (use EXPLAIN
to see wat will happen).

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: Paul Jungwirth
Дата:
Сообщение: Re: Splitting Postgres into Separate Clusters?
Следующее
От: JotaComm
Дата:
Сообщение: Problems with PostgreSQL Replication (Log Shipping)