Re: SPI_ERROR_CONNECT within pl/pgsql, PG 8.4

From: Marek Lewczuk <newsy(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 11:28:51
Message-ID: daadfdc20907130428m7f614ccaw83a2f15ab324d9d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2009/7/10 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Marek Lewczuk <marek(at)lewczuk(dot)com> writes:
>> I have made an upgrade to PG 8.4 and following error was thrown during
>> execution of some pl/pgsql function:
>> ERROR:  XX000: SPI_connect failed: SPI_ERROR_CONNECT
>
> Really?  Could we see a self-contained example?
Really... And what is very problematic it doesn't happen always. Right
now this error is thrown in another trigger/function as well:
ERROR: XX000: SPI_connect failed: SPI_ERROR_CONNECT
CONTEXT: PL/pgSQL function
"configurationvsibundle_updateconfigurationbundlestrigger" line 116 at
assignment
LOCATION: plpgsql_call_handler, pl_handler.c:77
STATEMENT: update configurationvsibundle set newbundle = cast($1 as
vsibundle) where id = $2

I can't prepare an example, cause I can't reproduce this error in an
example, but in production database that error occurs. As I wrote
before, the problem is also that second try of executing a statement,
that cause an error works just fine, but I don't know whether this is
executed in the same connection or in the different one, cause my
application uses connection pooling. How can it be, that pl/pgsql
looses SPI connection within the middle of some function ?

Thanks for help.

ML

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Gould 2009-07-13 12:13:39 Request for features
Previous Message Sim Zacks 2009-07-13 11:27:04 Re: was field updated