Re: pg_upgrade --logfile option documentation

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade --logfile option documentation
Date: 2012-03-06 02:17:47
Message-ID: 20120306021747.GA15997@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 28, 2012 at 09:45:41PM -0500, Bruce Momjian wrote:
> On Tue, Feb 28, 2012 at 02:15:30PM -0500, Bruce Momjian wrote:
> > On Tue, Feb 28, 2012 at 01:24:45PM -0500, Robert Haas wrote:
> > > > Running this script will delete the old cluster's data files:
> > > >    /usr/local/pgdev/pg_upgrade/delete_old_cluster.sh
> > >
> > > I think you should rename the old control file just before the step
> > > that says "linking user relation files". That's the point after which
> > > it becomes unsafe to start the old cluster, right?
> >
> > Yes, it is true that that is the danger point, and also it is much less
> > likely to fail at that point --- it usually happens during the schema
> > creation. I would have to add some more conditional wording without
> > clearly stating if the old suffix is present.
>
> OK, I have implemented both Roberts and Àlvaro's ideas in my patch.
> I only add the .old suffix to pg_controldata when link mode is used, and
> I now do it after the schema has been created (the most common failure
> case for pg_upgrade), and just before we actually link files --- both
> very good ideas.
>
> Patch attached; new pg_upgrade output with link mode below.

Patch applied. I will now work on the change to keep the schema restore
and server logs around in case of a failure.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-06 04:38:33 Re: Dropping PL language retains support functions
Previous Message Kyotaro HORIGUCHI 2012-03-06 02:13:45 Re: Speed dblink using alternate libpq tuple storage