Assertion failure from plan cache invalidation

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Assertion failure from plan cache invalidation
Date: 2010-08-13 12:01:23
Message-ID: 4C653413.2020105@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

This leads to assertion failure, on versions 8.3 onwards where plan
cache invalidation was introduced:

postgres=# CREATE FUNCTION ttfunc() RETURNS VOID AS $$
begin
PERFORM * FROM temptable;
END;
$$ LANGUAGE plpgsql;
CREATE FUNCTION
postgres=# begin;
BEGIN
postgres=# CREATE TEMPORARY TABLE temptable (id int4);
CREATE TABLE
postgres=# SELECT ttfunc();
ttfunc
--------

(1 row)

postgres=# rollback;
ROLLBACK
postgres=# SELECT ttfunc();
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

TRAP: FailedAssertion("!(((bool) ((myTempNamespace) != ((Oid) 0))))",
File: "namespace.c", Line: 2705)

PushOverrideSearchPath() assumes that if the temporary namespace existed
when an override search path was memorized with GetOverrideSearchPath(),
it must still exist. That's not true in the above example, rolling back
the transaction that the temporary namespace was created in drops it.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-08-13 13:34:33 Re: BUG #5616: psql Doesn't Change Log files on \c
Previous Message hubert depesz lubaczewski 2010-08-13 08:38:06 Re: BUG #5616: psql Doesn't Change Log files on \c