From: Bruce Momjian <bruce@momjian.us>
To: Maciek Sakrejda <m.sakrejda@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
Date: Sat, 7 Jul 2012 10:45:44 -0400
Message-ID: <20120707144544.GF26828@momjian.us> (raw)
In-Reply-To: <CAOtHd0ByqHPBRvExZgHfX4F28sYtAu2koDFAyJ8ZPo2qZ4kN1Q@mail.gmail.com>
References: <14513.1341081467@sss.pgh.pa.us>
<20120702154211.GA25966@momjian.us>
<19241.1341248511@sss.pgh.pa.us>
<20120702172836.GB25966@momjian.us>
<20120704213703.GH5578@momjian.us>
<9917.1341462118@sss.pgh.pa.us>
<20120705133253.GJ5578@momjian.us>
<CA+TgmoZBoPYon_Onz8kdou8oT8FiiepBP1e8WuDANCTMQ3kmNA@mail.gmail.com>
<20120706233441.GA26828@momjian.us>
<CAOtHd0ByqHPBRvExZgHfX4F28sYtAu2koDFAyJ8ZPo2qZ4kN1Q@mail.gmail.com>
On Fri, Jul 06, 2012 at 08:38:01PM -0700, Maciek Sakrejda wrote:
> >> Well, the part I understood was that your fix apparently does not
> >> guarantee to restore plpgsql to the state it was in, just to restore
> >> it to existence. But previous complaints about similar issues have
> >> fallen on deaf ears (see bug #5184). Perhaps Tom has had a change of
> >> heart, but if so we have a few things to fix, not just this one.
> >
> > Yes, I think my fix gives binary-upgrade the same behavior as
> > pg_dump/restore --- for all its good and bad. I couldn't see why they
> > should be different, or at least why binary-upgrade should be worse
> > (throw an error).
>
> I agree that they shouldn't be different, but if this can't be made to
> work, perhaps both should fail in this situation? Changing ownership
> of objects on a dump/restore seems like a decidedly un-Postgres-like
> foot-gun. Granted, this is only applicable in only a small set of
> situations, but it's still a foot-gun--a metadata integrity issue if
> you will. For what it's worth, I completely agree with Robert's
> comments in the thread regarding #5184 [1]. Does the comparison to
> template0/1 suggested in that thread merit further consideration?
>
> [1]: http://archives.postgresql.org/pgsql-bugs/2009-11/msg00113.php
Yes, if both binary and non-binary restores should throw errors, I am
fine with that too. Frankly, the filter we use now for extensions in
binary mode, FirstNormalObjectId, isn't sufficient because I think you
can modify the extension without changing its oid.
--
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, m.sakrejda@gmail.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: BUG #6706: pg_upgrade fails when plpgsql dropped/re-created
In-Reply-To: <20120707144544.GF26828@momjian.us>
References: <14513.1341081467@sss.pgh.pa.us> <20120702154211.GA25966@momjian.us> <19241.1341248511@sss.pgh.pa.us> <20120702172836.GB25966@momjian.us> <20120704213703.GH5578@momjian.us> <9917.1341462118@sss.pgh.pa.us> <20120705133253.GJ5578@momjian.us> <CA+TgmoZBoPYon_Onz8kdou8oT8FiiepBP1e8WuDANCTMQ3kmNA@mail.gmail.com> <20120706233441.GA26828@momjian.us> <CAOtHd0ByqHPBRvExZgHfX4F28sYtAu2koDFAyJ8ZPo2qZ4kN1Q@mail.gmail.com> <20120707144544.GF26828@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