Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4

From: Marek Lewczuk <marek(at)lewczuk(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PGSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4
Date: 2009-07-13 13:48:40
Message-ID: daadfdc20907130648l777001b0y3e7db06e660748d3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2009/7/13 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma 2009-07-13 13:55:34 Re: LAPUG Social - Tuesday Evening July 14
Previous Message Bruce Momjian 2009-07-13 13:42:08 Re: Request for features