Re: lazy detoasting

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: lazy detoasting
Дата
Msg-id 18399.1523469317@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: lazy detoasting  (Chapman Flack <chap@anastigmatix.net>)
Ответы Re: lazy detoasting  (Chapman Flack <chap@anastigmatix.net>)
Список pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> On 04/11/2018 11:33 AM, Tom Lane wrote:
>> OK, but if this object only lives within a single function call,
>> what's the problem?  The underlying row must be visible to the
>> calling query, and that condition won't change for the duration
>> of the call.

> Well, the devilsAdvocate() function would stash the object
> in a static, then try to look at it some time in a later call
> in the same transaction.

If you're worried about that, you should also worry about what happens
if the function uses the static variable in some later transaction.
The spec grants you license to throw an error, but it still needs to
be a clean error (not something about "can't find toast value", IMO).

Can you detect that the value is being stored in a long-lived variable
and detoast at that point?

            regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 'make check' fails
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WARNING in parallel index creation.