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

2021-08-10 Thread Michael Paquier
On Fri, Jul 30, 2021 at 11:22:43AM -0400, Tom Lane wrote: > Happy to make it so. Anyone have suggestions about the wording of > the message? For the archives, this has been applied as of ef12f32, and the new message seems explicit enough: + if (unlikely(portal == NULL)) + elog(ERROR, "can

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

2021-07-30 Thread Tom Lane
Daniel Gustafsson writes: >> On 30 Jul 2021, at 17:06, Tom Lane 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(p

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

2021-07-30 Thread Daniel Gustafsson
> On 30 Jul 2021, at 17:06, Tom Lane 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)) > +

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

2021-07-30 Thread Tom Lane
Michael Paquier writes: > On Fri, Jul 30, 2021 at 08:57:35AM +, liuhuail...@fujitsu.com wrote: >> When I used SPI_execute_plan function on PG12 which commit 41c6a5be is used, >> Segment fault occurred. > I see nothing wrong in this commit, FWIW. > But I see an issue with your code. It seems

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

2021-07-30 Thread Michael Paquier
On Fri, Jul 30, 2021 at 08:57:35AM +, liuhuail...@fujitsu.com wrote: > When I used SPI_execute_plan function on PG12 which commit 41c6a5be is used, > Segment fault occurred. > > PS: If commit 41c6a5be is not used, this phenomenon will not happen. I see nothing wrong in this commit, FWIW. >

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

2021-07-30 Thread Ranier Vilela
Em sex., 30 de jul. de 2021 às 05:57, liuhuail...@fujitsu.com < liuhuail...@fujitsu.com> escreveu: > Hi, all > > When I used SPI_execute_plan function on PG12 which commit 41c6a5be is > used, > Segment fault occurred. > > PS: If commit 41c6a5be is not used, this phenomenon will not happen. > > Rep

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

2021-07-30 Thread Zhihong Yu
On Fri, Jul 30, 2021 at 3:30 AM Greg Nancarrow wrote: > On Fri, Jul 30, 2021 at 6:57 PM liuhuail...@fujitsu.com > wrote: > > > > When I used SPI_execute_plan function on PG12 which commit 41c6a5be is > used, > > Segment fault occurred. > > I'm not seeing any such commit. > Can you provide a link

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

2021-07-30 Thread Greg Nancarrow
On Fri, Jul 30, 2021 at 6:57 PM liuhuail...@fujitsu.com wrote: > > When I used SPI_execute_plan function on PG12 which commit 41c6a5be is used, > Segment fault occurred. I'm not seeing any such commit. Can you provide a link to the commit in GitHub? Regards, Greg Nancarrow Fujitsu Australia

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

2021-07-30 Thread liuhuail...@fujitsu.com
Hi, all When I used SPI_execute_plan function on PG12 which commit 41c6a5be is used, Segment fault occurred. PS: If commit 41c6a5be is not used, this phenomenon will not happen. Reproduce: In a background process, the following steps are executed. -- StartTransactionComm