Re: WHERE CURRENT OF behaviour is not what's documented

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: WHERE CURRENT OF behaviour is not what's documented
Дата
Msg-id 20130918122748.GA22364@awork2.anarazel.de
обсуждение исходный текст
Ответ на WHERE CURRENT OF behaviour is not what's documented  (Boszormenyi Zoltan <zb@cybertec.at>)
Ответы Re: WHERE CURRENT OF behaviour is not what's documented  (Boszormenyi Zoltan <zb@cybertec.at>)
Список pgsql-hackers
On 2013-09-18 14:23:19 +0200, Boszormenyi Zoltan wrote:
> Hi,
> 
> I have experimented with cursors a little and found that the part about FOR
> SHARE/FOR UPDATE in
> 
> http://www.postgresql.org/docs/9.2/interactive/sql-declare.html
> 
> i.e. the "sensitive cursor" is not what actually happens. BTW, 9.3 has the
> same contents for the same page.
> 
> "
> If the cursor's query includes FOR UPDATE or FOR SHARE, then returned rows
> are locked at the time they are first fetched, in the same way as for a
> regular SELECT
> <http://www.postgresql.org/docs/9.3/interactive/sql-select.html> command
> with these options. In addition, the returned rows will be the most
> up-to-date versions; therefore these options provide the equivalent of what
> the SQL standard calls a "sensitive cursor". (Specifying INSENSITIVE
> together with FOR UPDATE or FOR SHARE is an error.)
> "
> 
> The statement that the "most up-to-date versions of the rows are returned"
> doesn't reflect the reality anymore:

I think it's not referring to the behaviour inside a single session but
across multiple sessions. I.e. when we follow the ctid chain of a tuple
updated in a concurrent session.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Boszormenyi Zoltan
Дата:
Сообщение: WHERE CURRENT OF behaviour is not what's documented
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: psql should show disabled internal triggers