Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 3218A92B8EB for ; Thu, 5 Jul 2012 19:28:50 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SmuXW-0004hk-4c for pgsql-bugs@postgresql.org; Thu, 05 Jul 2012 22:28:49 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q65MSVKX001317; Thu, 5 Jul 2012 18:28:31 -0400 (EDT) From: Tom Lane To: Payal Singh , Bruce Momjian cc: Craig Ringer , pgsql-bugs@postgresql.org Subject: Re: Problem with pg_upgrade In-reply-to: References: <4FF5BD8A.5010307@ringerc.id.au> Comments: In-reply-to Payal Singh message dated "Thu, 05 Jul 2012 16:24:28 -0400" Date: Thu, 05 Jul 2012 18:28:31 -0400 Message-ID: <1316.1341527311@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/35 X-Sequence-Number: 33511 Payal Singh writes: > On Thu, Jul 5, 2012 at 12:15 PM, Craig Ringer 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