Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C546D1337B47 for ; Mon, 28 Feb 2011 11:44:51 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 90742-01 for ; Mon, 28 Feb 2011 15:44:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9F88A1337B39 for ; Mon, 28 Feb 2011 11:44:37 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p1SFiacT007482; Mon, 28 Feb 2011 10:44:36 -0500 (EST) To: "Ingmar Brouns" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5902: pl/pgsql plans are not invalidated on discard all In-reply-to: <201102281409.p1SE9vcS050393@wwwmaster.postgresql.org> References: <201102281409.p1SE9vcS050393@wwwmaster.postgresql.org> Comments: In-reply-to "Ingmar Brouns" message dated "Mon, 28 Feb 2011 14:09:57 +0000" Date: Mon, 28 Feb 2011 10:44:36 -0500 Message-ID: <7481.1298907876@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/236 X-Sequence-Number: 29508 "Ingmar Brouns" writes: > Description: pl/pgsql plans are not invalidated on discard all Yes they are. > I ran into the pl/pgsql Plan Invalidation and search_path bug that is on the > todo list > http://wiki.postgresql.org/wiki/Todo#PL.2FpgSQL > I was looking for a workaround to this problem, and figured that calling > 'discard all', or 'discard plans' should do the trick. That's not a solution because the plancache module intentionally preserves the original search_path value while replanning. This may not be what you wished for, but it's operating as intended, and changing it would break other use-cases that work today. regards, tom lane