Re: vary read_only in SPI calls? or poke at the on-entry snapshot?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: vary read_only in SPI calls? or poke at the on-entry snapshot?
Дата
Msg-id 14247.1537418670@sss.pgh.pa.us
обсуждение исходный текст
Ответ на vary read_only in SPI calls? or poke at the on-entry snapshot?  (Chapman Flack <chap@anastigmatix.net>)
Ответы Re: vary read_only in SPI calls? or poke at the on-entry snapshot?  (Chapman Flack <chap@anastigmatix.net>)
Re: vary read_only in SPI calls? or poke at the on-entry snapshot?  (Chapman Flack <chap@anastigmatix.net>)
Список pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> Would it be unprecedented / be unreasonable / break anything for the
> install_jar function to simply force a CommandCounterIncrement
> at the end of step 1 (after its temporary snapshot has been popped,
> so the former/on-entry ActiveSnapshot gets the increment)?

The risk you take there is changing the behavior of calling function(s).

> DECISION TIME ...

> 1. fiddle the loader to always pass read_only => false to SPI calls,
>    regardless of the volatility of the function it is loading for.
> 2. leave the loader alone, and adjust install_jar (an infrequent
>    operation) to do something heretical with its on-entry snapshot.

I suspect #1 is less likely to have bad side-effects.  But I've not
done any careful analysis.

            regards, tom lane


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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: infinite loop in parallel hash joins / DSA / get_best_segment
Следующее
От: Andrey Lepikhov
Дата:
Сообщение: Re: Making all nbtree entries unique by having heap TIDs participatein comparisons