Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4 - Mailing list pgsql-general

From Marek Lewczuk
Subject Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4
Date
Msg-id daadfdc20907130648l777001b0y3e7db06e660748d3@mail.gmail.com
Whole thread Raw
In response to Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
2009/7/13 Tom Lane <tgl@sss.pgh.pa.us>:
> No, you're misinterpreting the message.  What that code likely means
> is that something is trying to use SPI and finding plpgsql already
> connected.  In other words, plpgsql forgets to do a SPI_push() before
> calling something that might try to use SPI re-entrantly.  It should be
> perfectly deterministic and it definitely doesn't have anything to do
> with the states of other sessions.  But we're going to need a test
> case to fix it.
I will try to prepare a test case, but as I said it is very
difficult... I've notice one thing - when that error occured I've
tried to repeat execution of the query but it didn't work - query was
executed in different connections from the pool. However in totaly new
connection (not taken from the connection pool) same query was
executed without any problem. So it seems, that for connections that
are in the pool SPI connection was not closed ??

--
Pozdrawiam
Marek Lewczuk

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with Check Constraint in pg_restore
Next
From: David Fetter
Date:
Subject: Re: Start With... Connect By?