Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng7JK-0001r6-Qu for pgsql-general@arkaria.postgresql.org; Sun, 17 Apr 2022 15:59:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ng7JJ-0003fU-I8 for pgsql-general@arkaria.postgresql.org; Sun, 17 Apr 2022 15:59:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng7JI-0003fJ-1K for pgsql-general@lists.postgresql.org; Sun, 17 Apr 2022 15:59:37 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng7JF-0003ZO-5e for pgsql-general@lists.postgresql.org; Sun, 17 Apr 2022 15:59:35 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 36F073200E5F; Sun, 17 Apr 2022 11:59:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 17 Apr 2022 11:59:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1650211170; x= 1650297570; bh=sqvuWLPkZqR5ImqMTVhfLHUdLcjtwNd849SY2D6nbeA=; b=D kjBzUTmELqBZICrtlgy+LHk5nbgTiDRONwkE3muo2AlN7dUfAnkGqk6Jzz8wTPWo PfV5q95qvnVcic8/Rr/y3BCxsQzSzTHdl5Z6ooWqvhlaYKwO5cqwqLj0AuA8mLju CyYqoocPGiaD+rcvkmmzvqVEgONklO7Z7dafmFpMxC3Buyt34xxx8OyzAPWIOEQh z0LUmBn0/rurG1FkhmE/UHKsxxOMSZjirDhHdmHGFdtFwINEBNeLvRRnTQCn+BdY RAQTNgrp214PQuJd+VfeY5VcgMtFodn46HUEYwi++DplczZjFPvfaHBwP7xD2XoP j+ezKSr9fwTkW10ScrPrA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1650211170; x=1650297570; bh=sqvuWLPkZqR5ImqMTVhfLHUdLcjt wNd849SY2D6nbeA=; b=wNBEMsww8TV5Kg4VO+0oZtnZBa8lztSnhkrBKyE19y1q J6spCsatMAX0ZvrTY1Z6NPLJ6TsdmYBFA56CFmDZq/SZJOYGr1j0Px7B5UvJWa4j 8EV8Kxj/R3rx1NWSzLiWqwjyOOAzHfPE7hTp/vGmSrHU9OBZ4iwfz/Pra0Ap9Ui3 kAfJ9muLzJzjo6R1X37YDz5/hK1JlspaNhbLK/l8LNQu2iNoRR8BpkCvo0Utp6p7 TBr/V2oICU6TgTq4kxgIlKoSCQ1633n9wsSMcLKxSrlIbgi8wqlndyKyoQuKl1Pu xeKbZ6ImnV8Ym32uWt2t1kkmtW2XkK4tIkxNf2oXqg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelledgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpedugfeuleegveffhfegleejhefhtedtgeeileeggfeh fefffeevgeejtdeutefftdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 17 Apr 2022 11:59:30 -0400 (EDT) Message-ID: <10dcd957-dc0b-9e94-1508-0a3c958ff924@aklaver.com> Date: Sun, 17 Apr 2022 08:59:29 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: Facing issues with pgsql upgrade. Content-Language: en-US To: Ajay Kajla , pgsql-general@lists.postgresql.org References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/16/22 22:30, Ajay Kajla wrote: > Hello All, > > > I'm facing the following issue while upgrading pgsql 9.6 to pgsql 13. > > It's saying database "template0" "template1" does not exist on source > 9.6, please advise. > > > image.png > From the below it looks like something/someone deleted the template0 and template1 directories in the data directory. Is there a file backup of the data directory? > > [postgres@htf:/var/lib/pgsql]$ psql > > psql (9.2.24, server 9.6.24) > > WARNING: psql version 9.2, server version 9.6. > >          Some psql features might not work. > > Type "help" for help. > > postgres=# \c template0 > > FATAL:  database "template0" does not exist > > DETAIL:  The database subdirectory "base/13268" is missing. > > Previous connection kept > > postgres=# \c template1 > > FATAL:  database "template1" does not exist > > DETAIL:  The database subdirectory "base/1" is missing. > > Previous connection kept > > postgres=# > > > > With Regards, > > Ajay Kajla > -- Adrian Klaver adrian.klaver@aklaver.com