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 15:13:40 -0400
Message-ID: <20120316191340.GD28340@momjian.us> (raw)
In-Reply-To: <CADmi=6M8Z5x+r12Xvz17nWrk7bF_X+bfnpNi-OrK+N16Dfn9WQ@mail.gmail.com>
References: <E1S8AUj-0002Fe-V6@wrigleys.postgresql.org>
<201203151454.26372.andres@anarazel.de>
<CADmi=6PLvBYD0GKf+O0-O3+Xnp8HMJiq-Us1gwYAQ8dgWUCQLA@mail.gmail.com>
<CADmi=6P7A43Bv6ErGAD_g2B5jKA9iwzoB0XRiY68aYrcg+p_bw@mail.gmail.com>
<20120316175402.GD8738@momjian.us>
<CADmi=6M8Z5x+r12Xvz17nWrk7bF_X+bfnpNi-OrK+N16Dfn9WQ@mail.gmail.com>
On Sat, Mar 17, 2012 at 01:57:29AM +0700, Stuart Bishop wrote:
> On Sat, Mar 17, 2012 at 12:54 AM, Bruce Momjian <bruce@momjian.us> wrote:
>
> > Well, it will because, by creating the symlink, you allowed this
> > function to be restored into the new database, and it isn't properly
> > hooked to the plpython language. I wonder if you should just delete it
> > because I believe you already have the right plpython2 helper functions
> > in place. Can you run this query for me in one of the problem databases
> > in the new and/or old cluster and send me the output:
> >
> > SELECT proname,probin FROM pg_proc WHERE probin LIKE '%python%';
>
> # SELECT nspname,proname,probin FROM pg_proc,pg_namespace WHERE probin
> LIKE '%python%' and pg_proc.pronamespace=pg_namespace.oid;
> nspname | proname | probin
> ------------+-----------------------+------------------
> pg_catalog | plpython_call_handler | $libdir/plpython
> public | plpython_call_handler | $libdir/plpython
> (2 rows)
>
> I have no idea how I managed to grow the duplicate in the public
> schema, but this does seem to be the source of the confusion. I might
> be able to dig out when I grew it from revision control, but I don't
> think that would help.
Yes, if you delete the public one, you should be fine. If you need
CASCADE, then something is wrong because their is some depenency on it.
Odds are it might have gotten created before we had full schema support
for language or something. The March 5 reporter probably had the same
problem, so isn't just you.
> > What we need is for pg_dumpall to _not_ output those handlers.
>
> Or pick it up in the check stage and make the user resolve the
> problem. If I shot myself in the foot in some particularly obtuse way,
> it might not be sane to bend over backwards making pg_upgrade repair
> things.
I think we need someone to figure out how this happened before we
actually adjust anything. At least we know what to advise people now.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
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: <20120316191340.GD28340@momjian.us>
References: <E1S8AUj-0002Fe-V6@wrigleys.postgresql.org> <201203151454.26372.andres@anarazel.de> <CADmi=6PLvBYD0GKf+O0-O3+Xnp8HMJiq-Us1gwYAQ8dgWUCQLA@mail.gmail.com> <CADmi=6P7A43Bv6ErGAD_g2B5jKA9iwzoB0XRiY68aYrcg+p_bw@mail.gmail.com> <20120316175402.GD8738@momjian.us> <CADmi=6M8Z5x+r12Xvz17nWrk7bF_X+bfnpNi-OrK+N16Dfn9WQ@mail.gmail.com> <20120316191340.GD28340@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