Re: BUG #17035: assert after commit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: rekgrpth(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17035: assert after commit
Date: 2021-05-26 17:47:53
Message-ID: 1549812.1622051273@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> Hmm, see for example [1] which is doing SPI_prepare_my() [2] and then
> SPI_execute_plan_my() ... Does the SPI interface really require that you
> create an ActivePortal in the SPI-calling code?

The expectation is that the calling code is already executing inside
some Portal. If it isn't, it's incumbent on the caller to set up
an adequate substitute environment, in particular a transaction
snapshot. The only thing 84f5c2908 changed is that now you get
a guaranteed failure if you neglect to provide that, rather than
failing only in corner cases.

Possibly we should change that Assert to an elog that tries to
make it clear that the blame is on the caller.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-05-26 18:15:15 BUG #17037: ST_Azimuth used with geography produces results not in accordance with documentation
Previous Message Alvaro Herrera 2021-05-26 17:40:17 Re: BUG #17035: assert after commit