2009/7/13 Tom Lane <tgl@xxxxxxxxxxxxx>: > 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general