Re: pg_upgrade vs extension upgrades

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade vs extension upgrades
Date: 2017-04-13 19:48:55
Message-ID: CABUevExCSTixStPct+sp-pj2aqw8XcxPWjm9Xz64q3Bt0cM-dQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 13, 2017 at 9:13 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> On Thu, Apr 13, 2017 at 09:02:27PM +0200, Magnus Hagander wrote:
> > On Thu, Apr 13, 2017 at 12:30 AM, Peter Eisentraut <
> > peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> >
> > On 4/10/17 11:30, Magnus Hagander wrote:
> > > After you've run pg_upgrade, you have to loop through all your
> databases
> > > and do an "ALTER EXTENSION abc UPDATE" once for each extension.
> > >
> > > Is there a reason we shouldn't have pg_upgrade emit a script that
> does
> > > this, similar to how it emits a script to run ANALYZE?
> >
> > Shouldn't pg_dump do this, and perhaps by default?
> >
> >
> > If I restore a dump into another instance, I need to upgrade all my
> > extensions to that installations's versions, no? That's not
> particular
> > to pg_upgrade.
> >
> > Sure, there's an argument to be made for that. But pg_dump (or in this
> case,
> > it would more be pg_restore I guess) also doesn't run ANALYZE or
> generate a
> > script to do that, does it? ISTM that we have already decided that
> pg_upgrade
> > has a different requirement on providing those things, whereas pg_dump/
> > pg_restore is more of a low-level tool where people have to figure more
> things
> > out themselves.
>
> Well, pg_upgrade creates ./analyze_new_cluster.sh, but that just
> contains:
>
> "/u/pgsql/bin/vacuumdb" --all --analyze-in-stages
>
> Seems like we should just get rid of ./analyze_new_cluster.sh and tell
> the user to run vacuumdb directly. I guess I will have to wait for PG
> 11 to do that though.
>
>
Yeah, at this point that probably makes a lot of sense, now that we don't
need the logic in the script anymore.

FWIW, I'm not sure the feature freeze means we can't *remove* a feature?
But I'll defer to others on that.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-04-13 19:54:09 Re: Row Level Security UPDATE Confusion
Previous Message Fujii Masao 2017-04-13 19:47:12 some review comments on logical rep code