Re: Questions about update, delete, ctid...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Questions about update, delete, ctid...
Дата
Msg-id 26281.1154280264@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Questions about update, delete, ctid...  ("Florian G. Pflug" <fgp@phlo.org>)
Ответы Re: Questions about update, delete, ctid...  ("Florian G. Pflug" <fgp@phlo.org>)
Список pgsql-general
"Florian G. Pflug" <fgp@phlo.org> writes:
> Martijn van Oosterhout wrote:
>> It's the t_ctid field of the tuple header. But I don't see what that
>> has to do with "WHERE CURRENT OF". That expression should return the
>> tuple visible to your transaction, not some updated version which you
>> won't be able to fetch. If you end up updating the old version, the
>> system will take care of finding the newer version if necessary.

> The problem is that the ctid of the tuple that "fetch" returned
> might not actually be the tuple that needs to be updated.

Martijn's got a point though: it's not clear that that needs any special
care on the part of WHERE CURRENT OF.  It may be that the existing
EvalPlanQual machinery does everything that's needful.  Is the example
you show really any different from updating a tuple that someone else
updated while your UPDATE was in progress?  In both cases the EPQ
machinery will take care of chaining forward to the right version to
update.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Joining dates/times (was Re: Splitting Timestamps)
Следующее
От: David Hoksza
Дата:
Сообщение: pg_statio_all_indexes