Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error The source cluster was not shut down cleanly.

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: kalyani kaniganti <kalyanithumati(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error The source cluster was not shut down cleanly.
Date: 2018-09-11 16:18:42
Message-ID: 20180911161842.GL20064@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Sep 11, 2018 at 08:57:26PM +0530, kalyani kaniganti wrote:
> Hi Bruce,
> Issue is solved after performing below steps 
>
> pgctl  start -D <old data folder>
> pgctl stop -D <old data folder>

Yes, I suspected this would fix it. You were shutdown, so pg_ctl stop
had no effect. Starting it and then shutting it down properly fixed it.

To summarize, you should never have been able to do upgrades without a
clean shutdown. 9.4.17 allowed it, but shouldn't have. This was fixed
in 9.4.19 throwing an error in such cases.

When the server is not cleanly shut down, there are potentially changes
in the WAL that were not replayed on startup into the shared buffers and
disk storage, so you could lose transaction or have an inconsistent
database. This was prevented in 9.4.19.

> But we tried to reinstall the postgressql and checked again. by default the
> satndby cluster is going to in production state and while executing the above
> commands sometimes the upgarde is working fine and issue is inconsistent.
>
> Do you have any suggestions.

You have still not provided any exact details of how the server was shut
down _before_ you ran pg_ctl stop, so I am not to going to bother
guessing any further.

--
Bruce Momjian <bruce(at)momjian(dot)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 +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Gierth 2018-09-11 16:31:24 Re: BUG #15378: SP-GIST memory context screwup?
Previous Message Andrew Gierth 2018-09-11 15:47:37 Re: BUG #15378: SP-GIST memory context screwup?