pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: kalyani kaniganti <kalyanithumati@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error The source cluster was not shut down cleanly.
Date: Tue, 11 Sep 2018 12:18:42 -0400
Message-ID: <20180911161842.GL20064@momjian.us> (raw)
In-Reply-To: <CACAAi_45KJ2SXLPWGQSKVVGRBzq_DEYxTPt9Qj50e0TPMxVLzg@mail.gmail.com>
References: <20180910041040.GB13949@momjian.us>
	<CACAAi_44jVAUy_=-sfajgJQueG4BD+WmhgggUeunUsR5uqF5RQ@mail.gmail.com>
	<CACAAi_5twp+su0AQ6xBD=drnFfd1VdxX5KGBsr8DBgH3XTaKig@mail.gmail.com>
	<20180910161443.GC20064@momjian.us>
	<20180910164735.GA28597@momjian.us>
	<CACAAi_5FnpZOjgbkUG9cM6RaKDUFNEZHi7Dt2qjQ5ueNTJtaow@mail.gmail.com>
	<20180910174823.GD20064@momjian.us>
	<CACAAi_4hHwkpjC4Qavsx3MpVEBDD_4=sDddnSRD681U2Y=5Lzg@mail.gmail.com>
	<20180911023439.GA27769@momjian.us>
	<CACAAi_45KJ2SXLPWGQSKVVGRBzq_DEYxTPt9Qj50e0TPMxVLzg@mail.gmail.com>

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@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 +




view thread (24+ messages)  latest in thread

Message-ID: <20180911161842.GL20064@momjian.us>
Permalink:  ../20180911161842.GL20064@momjian.us/
Also on:    postgresql.org/message-id/20180911161842.GL20064@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bruce@momjian.us, kalyanithumati@gmail.com
  Subject: Re: BUG #15376: Postgres sql 9.4.19 pg_upgrade stops with error The source cluster was not shut down cleanly.
  In-Reply-To: <20180911161842.GL20064@momjian.us>
  References: <20180910041040.GB13949@momjian.us> <CACAAi_44jVAUy_=-sfajgJQueG4BD+WmhgggUeunUsR5uqF5RQ@mail.gmail.com> <CACAAi_5twp+su0AQ6xBD=drnFfd1VdxX5KGBsr8DBgH3XTaKig@mail.gmail.com> <20180910161443.GC20064@momjian.us> <20180910164735.GA28597@momjian.us> <CACAAi_5FnpZOjgbkUG9cM6RaKDUFNEZHi7Dt2qjQ5ueNTJtaow@mail.gmail.com> <20180910174823.GD20064@momjian.us> <CACAAi_4hHwkpjC4Qavsx3MpVEBDD_4=sDddnSRD681U2Y=5Lzg@mail.gmail.com> <20180911023439.GA27769@momjian.us> <CACAAi_45KJ2SXLPWGQSKVVGRBzq_DEYxTPt9Qj50e0TPMxVLzg@mail.gmail.com> <20180911161842.GL20064@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox