Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id B933EBAD467 for ; Thu, 31 May 2012 22:37:23 -0300 (ADT) Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SaGnp-0002Uk-8j for pgsql-bugs@postgresql.org; Fri, 01 Jun 2012 01:37:23 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1SaGna-0002eg-L6; Thu, 31 May 2012 21:37:06 -0400 Date: Thu, 31 May 2012 21:37:06 -0400 From: Bruce Momjian To: Tom Lane Cc: Adrian Klaver , pgsql-bugs@postgresql.org Subject: Re: BUG #6666: pg_upgrade 9.2beta1 plpython/plpython2 Message-ID: <20120601013706.GM26894@momjian.us> References: <20120530023416.GQ20260@momjian.us> <20120531185342.GJ26894@momjian.us> <4FC7D675.5050005@gmail.com> <22498.1338503044@sss.pgh.pa.us> <20120531223030.GL26894@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120531223030.GL26894@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/256 X-Sequence-Number: 33227 On Thu, May 31, 2012 at 06:30:30PM -0400, Bruce Momjian wrote: > > Hm, I'm not sure about that. The general charter of pg_dump is to > > produce a dump that will replicate the state of the database. > > Editorializing on it in order to make it more likely to reload in a > > different version of PG seems to violate that charter. > > > > I think the current state where pg_upgrade just complains about those > > functions and tells you to remove them by hand is far safer than > > creating blind spots in pg_dump. > > Agreed. I think the big question is whether the 8.1 move of the PL > language support functions to pg_catalog should have suppressed dumping > the pre-8.1 PL functions in the public schema. > > Another question is whether having these functions in two schemas > presents any possible danger. Users using pg_dumpall and restoring (not > using pg_upgrade) will have the plpython functions removed because they > will error out, so maybe we should just let the plpython renaming trim > those out. However, this doesn't remove the other PL lanauge > duplicates. > > I share Tom's caution on this, but I think we need to make sure we are > addressing any possible risk of an isolated pg_upgrade fix, now that we > understand the cause. FYI, this query will show any functions defined in the public schema who's names match pg_pltemplate helper functions: SELECT proname FROM pg_proc JOIN pg_namespace ON (pronamespace = pg_namespace.oid) WHERE proname IN ( SELECT tmplhandler FROM pg_pltemplate UNION SELECT tmplinline FROM pg_pltemplate UNION SELECT tmplvalidator FROM pg_pltemplate ) AND nspname = 'public'; This is normal in pre-8.1 but might indicate orphaned functions in PG 8.1+. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +