On 6/12/18 10:03, Andrew Gierth wrote:
>>>>>> "Peter" == Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>
> Peter> The problem with these nested procedure calls is that if the
> Peter> nested call
>
> Did you miss the fact that the issue only occurs when the top-level
> procedure does a rollback? The problem is not with nested calls, but
> rather with the fact that commit or rollback is leaving ActiveSnapshot
> unset, which is (as Tom pointed out at the linked post) not the expected
> condition inside PL code.
We need that so that we can run things like SET TRANSACTION ISOLATION.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services