Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group