Re: Problem with pg_upgrade - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Problem with pg_upgrade
Date
Msg-id 1316.1341527311@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problem with pg_upgrade  (Payal Singh <payals1@umbc.edu>)
Responses Re: Problem with pg_upgrade  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
Payal Singh <payals1@umbc.edu> writes:
> On Thu, Jul 5, 2012 at 12:15 PM, Craig Ringer <ringerc@ringerc.id.au> wrote:
>> If you start 9.1 on a copy of the backup then cleanly stop it again, does
>> pg_upgrade then run?

> Thank you. That worked.

ISTM that pg_upgrade should check that the old cluster was shut down
cleanly, ie pg_control has state = "shut down".  AFAICT from some
testing, it currently only checks that there is no postmaster.pid file,
which is easily bypassed by users who might not realize that it's not
safe to run pg_upgrade against a filesystem backup.

BTW, I also noticed while trying to test this that pg_upgrade is
currently completely broken for the case of taking PGDATAOLD or
PGDATANEW from the environment rather than switches.  This is because
the existing coding in option.c fails to set up the "pgconfig" fields
in such cases.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Payal Singh
Date:
Subject: Re: Problem with pg_upgrade
Next
From: balaji03@gmail.com
Date:
Subject: BUG #6720: Its often disconnecting