Re: Segment fault when excuting SPI function On PG with commit 41c6a5be

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Segment fault when excuting SPI function On PG with commit 41c6a5be
Дата
Msg-id 3FC6DA1F-7B24-4B87-8142-10D04F70AB0E@yesql.se
обсуждение исходный текст
Ответ на Re: Segment fault when excuting SPI function On PG with commit 41c6a5be  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Segment fault when excuting SPI function On PG with commit 41c6a5be
Список pgsql-hackers
> On 30 Jul 2021, at 17:06, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I wonder if we should convert the Assert into an actual test-and-elog, say
> 
>     /* Otherwise, we'd better have an active Portal */
>     portal = ActivePortal;
> -    Assert(portal != NULL);
> +    if (unlikely(portal == NULL))
> +        elog(ERROR, "must have an outer snapshot or portal");
>     Assert(portal->portalSnapshot == NULL);
> 
> Perhaps that would help people to realize that the bug is theirs
> not EnsurePortalSnapshotExists's.

+1, that would probably be quite helpful.

--
Daniel Gustafsson        https://vmware.com/




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Segment fault when excuting SPI function On PG with commit 41c6a5be
Следующее
От: Jacob Champion
Дата:
Сообщение: Re: [PATCH] test/ssl: rework the sslfiles Makefile target