pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Stuart Bishop <stuart@stuartbishop.net>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [BUGS] BUG #6532: pg_upgrade fails on Python stored procedures
Date: Fri, 16 Mar 2012 14:08:53 -0400
Message-ID: <20120316180853.GA14587@momjian.us> (raw)
In-Reply-To: <20120316180507.GE8738@momjian.us>
References: <E1S8AUj-0002Fe-V6@wrigleys.postgresql.org>
	<20120315220850.GA20113@momjian.us>
	<CADmi=6MKi_iNB=fak=nsUMgqbwtKO-nstAP7fnt7iMkbhqjntg@mail.gmail.com>
	<20120316180507.GE8738@momjian.us>

On Fri, Mar 16, 2012 at 03:10:05PM +0700, Stuart Bishop wrote:
> > I have repeatedly upgraded from 9.0.X to 9.1.3 and am seeing no
> > failures.  The big question is what are you doing that is causing the
> > plpython_call_handler() function to be dumped?  That is an internal
> > function.  What is your old PG version?  I tested 8.4 and also could not
> > get the failure you see either.
> 
> This database schema began its life on PostgreSQL 7.4 over 8 years
> ago, so there may well be something unexpected lurking in there.

[ Email moved to hackers, and trimmed.]

That might be the cause --- see my posting asking for details.

> I can reproduce the error with the attached schema. It was created
> using 8.4's pg_dump. If I create a fresh 8.4 cluster and restore this,
> pg_dump and pg_dumpall spit out the plpython_call_handler statements.
> I think I've stripped out everything in there not in core or contrib.

Thanks.  Yes, this actually does show the cause:

	> --
	> -- Name: plpgsql_call_handler(); Type: FUNCTION; Schema: public; Owner: -
	> --
	> 
	> CREATE FUNCTION plpgsql_call_handler() RETURNS language_handler
	>     LANGUAGE c
	>     AS '$libdir/plpgsql', 'plpgsql_call_handler';
	> 
	> 
	> --
	> -- Name: plpython_call_handler(); Type: FUNCTION; Schema: public; Owner: -
	> --                                                        ******
	> 
	> CREATE FUNCTION plpython_call_handler() RETURNS language_handler
	>     LANGUAGE c
	>     AS '$libdir/plpython', 'plpython_call_handler';
	> 

Notice these are all in the public schema, which is causing pg_dumpall
to output them, and the rename of plpython is causing the failure.  Do
you have these functions also in the pg_catalog schema?  If so, they
must be dead functions left over from an old release of Postgres.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



view thread (9+ messages)  latest in thread

Message-ID: <20120316180853.GA14587@momjian.us>
Permalink:  ../20120316180853.GA14587@momjian.us/
Also on:    postgresql.org/message-id/20120316180853.GA14587@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, stuart@stuartbishop.net, pgsql-hackers@postgreSQL.org
  Subject: Re: [BUGS] BUG #6532: pg_upgrade fails on Python stored procedures
  In-Reply-To: <20120316180853.GA14587@momjian.us>
  References: <E1S8AUj-0002Fe-V6@wrigleys.postgresql.org> <20120315220850.GA20113@momjian.us> <CADmi=6MKi_iNB=fak=nsUMgqbwtKO-nstAP7fnt7iMkbhqjntg@mail.gmail.com> <20120316180507.GE8738@momjian.us> <20120316180853.GA14587@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox