Re: Can I use row-level locks to sequence READ COMMITTED transactions?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Can I use row-level locks to sequence READ COMMITTED transactions?
Дата
Msg-id 182.1027369867@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Can I use row-level locks to sequence READ COMMITTED transactions?  (Matthew Woodcraft <mattheww@chiark.greenend.org.uk>)
Ответы Re: Can I use row-level locks to sequence READ COMMITTED transactions?  ("Craig Sturman" <craig@emedscentral.com>)
Список pgsql-general
Matthew Woodcraft <mattheww@chiark.greenend.org.uk> writes:
> If I use a READ COMMITTED transaction, the documentation says that a
> query in my transaction may see changes which were committed by other
> transactions after my transaction started.
> My question is, is it guaranteed that a SELECT in my transaction will
> see changes previously committed by other transactions, or is it only a
> possibility?
> By 'previously committed', I mean 'committed by a transaction which held
> a row-level lock which my transaction has since obtained'.

Yes, that will work.  The SELECT sees rows that were committed at the
instant it starts, which will be after the other xact completes if you
use a FOR UPDATE lock.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Error abort transaction behaviour
Следующее
От: "Craig Sturman"
Дата:
Сообщение: Re: Can I use row-level locks to sequence READ COMMITTED transactions?