Re: out-of-order caution

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: out-of-order caution
Дата
Msg-id 4266.1319743842@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: out-of-order caution  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Simon Riggs <simon@2ndQuadrant.com> wrote:
>> On Thu, Oct 27, 2011 at 4:41 PM, Kevin Grittner
>> <Kevin.Grittner@wicourts.gov> wrote:
>>> | It is possible for a SELECT command using ORDER BY and FOR
>>> | UPDATE/SHARE to return rows out of order. This is because ORDER
>>> | BY is applied first.

>> I think it should say that if this occurs with SERIALIZED
>> transactions it will result in a serialisation error.
> Hmm.  At first reading I thought this was related to the
> mixed-snapshot issue in READ COMMITTED, but now I'm not so sure. 

Simon's comment is correct.  If you do a SELECT FOR UPDATE/SHARE in a
non-READ-COMMITTED transaction, and it turns out that someone modified
the tuple before you could lock it, you'll get a serialization error
(cf ExecLockRows()), not updated data.  So out-of-order sorting is
not possible.
        regards, tom lane


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

Предыдущее
От: Florian Pflug
Дата:
Сообщение: Re: Hot Backup with rsync fails at pg_clog if under load
Следующее
От: Tom Lane
Дата:
Сообщение: Re: out-of-order caution