Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error Thesource cluster was not shut down cleanly. - Mailing list pgsql-bugs

From kalyani kaniganti
Subject Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error Thesource cluster was not shut down cleanly.
Date
Msg-id CACAAi_5WH9gX3GyTPe3vOpJWHSqVtHvaTJgNtBm4oTtvEP9F2g@mail.gmail.com
Whole thread Raw
In response to Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error Thesource cluster was not shut down cleanly.  (Bruce Momjian <bruce@momjian.us>)
Responses Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error Thesource cluster was not shut down cleanly.  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
Hi Bruce,
Thanks for the immediate reply.
We are using pg_ctl command to shutdown the old server with no option.In this case the pg_ctl will consider as smart shutdown if no option is specified as per documentation .
please find bellow command.
<new path for data dir>/bin/pg_ctl -D <olddata dir path> stop 
We are using the same script for multiple releases in Postgres sql to upgrade the database from 9.1 to 9.4 .
Same script is working fine in 9.4.17 version, while upgrading DB from 9.1 to 9.4.17.
From the release notes of 9.4.19 version we did not find any changes done on pg_upgrade except one bug fix related to pg_upgrade has been fixed.
Do we have to add in our code to check for graceful shutdown or we have to wait for the next release?
Please let us know if you have any workaround till the next minor patch is released.

BR,
Kalyani

On Mon, Sep 10, 2018, 7:40 AM Bruce Momjian <bruce@momjian.us> wrote:
On Sun, Sep  9, 2018 at 06:22:24PM -0400, Bruce Momjian wrote:
> On Sun, Sep  9, 2018 at 04:14:45PM +0000, PG Bug reporting form wrote:
> What 9.4.19 fixed is that users were doing a pg_ctl -m immediate, and
> then running pg_upgrade, and getting _silently_ corrupted upgrades.
> 9.4.19 fixes this so pg_upgrade properly complains when this happens.
>
> You should only see that error if you are doing "immediate" shutdowns of
> your server, and this is not supported, and throws ane error.  Are you
> seeing the pg_upgrade error message when you do a _clean_ shutdown of
> your servers?

Also, you can't run pg_upgrade directly on standby servers.  You have to
either make it a primary server or use the rsync instructions in the
pg_upgrade docs.  The next minor release will have a better error
message on this.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables
Next
From: Bruce Momjian
Date:
Subject: Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error Thesource cluster was not shut down cleanly.