pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: rekgrpth@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17035: assert after commit
Date: Wed, 26 May 2021 13:47:53 -0400
Message-ID: <1549812.1622051273@sss.pgh.pa.us> (raw)
In-Reply-To: <20210526174017.GA11909@alvherre.pgsql>
References: <20210526174017.GA11909@alvherre.pgsql>

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





view thread (8+ messages)  latest in thread

Message-ID: <1549812.1622051273@sss.pgh.pa.us>
Permalink:  ../1549812.1622051273@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1549812.1622051273@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, rekgrpth@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17035: assert after commit
  In-Reply-To: <1549812.1622051273@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox