Re: BUG #17035: assert after commit
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: rekgrpth@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2021-05-26T17:47:53Z
Lists: pgsql-bugs
Alvaro Herrera <alvherre@alvh.no-ip.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
Commits
-
Use elog, not Assert, to report failure to provide an outer snapshot.
- f260436459a6 12.8 landed
- ef12f32c0870 15.0 landed
- ec410c985e6d 14.0 landed
- cefb1230e7aa 11.13 landed
- 93f99693f9c2 13.4 landed
-
Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.
- d18ee6f92d9a 13.4 cited