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

FK plans cached? Known bug?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: FK plans cached? Known bug?
Date: 2007-05-18 17:26:52
Message-ID: 20070518172652.GJ6695@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-bugs
I know that in 8.3 we have the new plan caching mechanism which fixes
this, but I am wondering if this particular problem was known:

alvherre=# delete from a where a = 2;
ERROR:  update o delete en «a» viola la llave foránea «b_a_fkey» en «b»
DETAIL:  La llave (a)=(2) todavía es referida desde la tabla «b».

alvherre=# drop index b_a;
DROP INDEX
alvherre=# delete from a where a = 2;
ERROR:  could not open relation with OID 16433
CONTEXT:  sentencia SQL: «SELECT 1 FROM ONLY "public"."b" x WHERE "a" = $1 FOR SHARE OF x»

(This is on 8.2)  What is happening here -- are we caching the plan for
the FK check query?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-05-18 17:44:46
Subject: Re: FK plans cached? Known bug?
Previous:From: IndrekDate: 2007-05-18 13:00:01
Subject: BUG #3290: can't install

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