Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TuU0n-0001Wv-Bd for pgsql-bugs@arkaria.postgresql.org; Sun, 13 Jan 2013 20:18:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TuU0m-0002MH-87 for pgsql-bugs@arkaria.postgresql.org; Sun, 13 Jan 2013 20:18:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TuU0l-0002MB-CJ for pgsql-bugs@postgresql.org; Sun, 13 Jan 2013 20:18:31 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TuU0i-0004vA-TV for pgsql-bugs@postgresql.org; Sun, 13 Jan 2013 20:18:30 +0000 Received: from anarazel.de (p5DDC49DD.dip.t-dialin.net [93.220.73.221]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0Lkzrh-1TMFBh006H-00bB0p; Sun, 13 Jan 2013 21:18:28 +0100 Received: by anarazel.de (Postfix, from userid 1000) id 00BB21C0173; Sun, 13 Jan 2013 21:18:26 +0100 (CET) Date: Sun, 13 Jan 2013 21:18:26 +0100 From: Andres Freund To: Tom Lane Cc: Kevin Grittner , Rodrigo Rosenfeld Rosas , pgsql-bugs@postgresql.org Subject: Re: wrong search_path being used Message-ID: <20130113201826.GA27004@awork2.anarazel.de> References: <20130112185917.255770@gmx.com> <21642.1358018978@sss.pgh.pa.us> <20130112193906.GC21523@awork2.anarazel.de> <22441.1358021631@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22441.1358021631@sss.pgh.pa.us> X-Provags-ID: V02:K0:qb4rBZo5ZzuqChUdhpPOM5ra0MUBnXDNotfVWVlZIhK yqlVcuwAyhgUk8qX6Aans8ul6DQ311xJmaxuDiIt1RoP0FEyzF eNySuUGmlizC1LZ8g8O8E7/M2MhH4Zj4Ks02tXufBcCwPJVKGD mRtiP50JmfQ55WL1IZAi+dLlOfftfhVlJ0nc7c9ygGYBPiGfQM mqg2bIwVC3bwkkJppUQzc/X1Jms7PzXFegfC2PMkyeFiRXJoXa Ub/FibnCz4WIiBtwzs1g3NLCqTuU3B01IUS5xUwcfA1YSgFkTW cemeOLN+7mP35DUcc0gjt3SbfFyWo8hr23zW7AMNCvyQEB8fMx rMa70YWUrry9JLMRFqPLyA06tQX8WtMX855IjCKuG X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2013-01-12 15:13:51 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2013-01-12 14:29:38 -0500, Tom Lane wrote: > >> I think that the alternative most likely to succeed is to consider any > >> change in the active value of search_path as forcing replanning of > >> cached plans. > > > I guess it wouldn't really be feasible to keep the search path used to > > plan a query in its cached form and check that it fits the one currently > > used on every use of the cached plan? > > Actually that's exactly what I meant: every time we arrive at a query > with a cached plan, check to see if the active search_path value is the > same as what it was when we made the cached plan, and replan if not. Okay. I was afraid it would add noticeable overhead to stuff like plpgsql... Maybe would lower that by having a "search_path" generation counter that gets increased everytime it gets changed but that seems a bit too complicated. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs