Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzlNJ-0007Ml-5P for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Sep 2018 16:18:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzlNH-0001B8-6K for pgsql-bugs@arkaria.postgresql.org; Tue, 11 Sep 2018 16:18:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzlNH-0001B1-0O for pgsql-bugs@lists.postgresql.org; Tue, 11 Sep 2018 16:18:47 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fzlND-0005R6-RY for pgsql-bugs@lists.postgresql.org; Tue, 11 Sep 2018 16:18:46 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1fzlNC-0004GW-8D; Tue, 11 Sep 2018 12:18:42 -0400 Date: Tue, 11 Sep 2018 12:18:42 -0400 From: Bruce Momjian To: kalyani kaniganti 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. Message-ID: <20180911161842.GL20064@momjian.us> References: <20180910041040.GB13949@momjian.us> <20180910161443.GC20064@momjian.us> <20180910164735.GA28597@momjian.us> <20180910174823.GD20064@momjian.us> <20180911023439.GA27769@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 > pgctl stop -D 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 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 +