Re: assert in nested SQL procedure call in current HEAD

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: assert in nested SQL procedure call in current HEAD
Дата
Msg-id CA+q6zcV4gyMW4Kvf_hpsdsug8wf8aeLOR3BNNGo82TSGoEzARg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: assert in nested SQL procedure call in current HEAD  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: assert in nested SQL procedure call in current HEAD  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: assert in nested SQL procedure call in current HEAD  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
> On 8 June 2018 at 06:20, Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:

>  Joe> My colleague Yogesh Sharma discovered an assert in nested SQL
>  Joe> procedure calls after ROLLBACK is used. Minimal test case and
>  Joe> backtrace below. I have not yet tried to figure out exactly what
>  Joe> is going on beyond seeing that it occurs in pg_plan_query() where
>  Joe> the comment says "Planner must have a snapshot in case it calls
>  Joe> user-defined functions"...
>
>  Andrew> https://www.postgresql.org/message-id/29608.1518533639@sss.pgh.pa.us
>
> I added it to the open items list since nobody else seems to have taken
> notice; from Tom's linked message it seems this should be Peter E's bag?

I've taken a look at this - indeed, the situation looks similar to what
described in the linked message, namely after a transaction rollback and
creation of a new one no active snapshot was pushed. But in this particular
case the timeframe without an active snapshot is actually limited and includes
only some initialization and planning activity (after that a new one is
pushed). The commentary says that "Planner must have a snapshot in case it
calls user-defined functions." -  I tried to simulate this in order to see what
would happen, but got no errors. Is there a chance that it's an outdated
Assert?


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PostgreSQL vs SQL Standard
Следующее
От: David Fetter
Дата:
Сообщение: Re: PostgreSQL vs SQL Standard