Assertion failure from plan cache invalidation - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Assertion failure from plan cache invalidation
Date
Msg-id 4C653413.2020105@enterprisedb.com
Whole thread Raw
Responses Re: Assertion failure from plan cache invalidation  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-bugs by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: BUG #5616: psql Doesn't Change Log files on \c
Next
From: Tom Lane
Date:
Subject: Re: BUG #5616: psql Doesn't Change Log files on \c