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 1lFg5g-0005LC-Ob for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Feb 2021 16:35:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lFg5f-0005pq-4F for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Feb 2021 16:35:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFg5e-0005pj-US for pgsql-bugs@lists.postgresql.org; Fri, 26 Feb 2021 16:35:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFg5c-0007i3-TY for pgsql-bugs@lists.postgresql.org; Fri, 26 Feb 2021 16:35:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 11QGZaoK287555; Fri, 26 Feb 2021 11:35:36 -0500 From: Tom Lane To: "Kumari, Jyoti" cc: "pgsql-bugs@lists.postgresql.org" , "Tamrakar, Animesh" , "Pokharna, Prashant" , "Bharti, Anand" Subject: Re: Upgrade issue during Postgres 9.6 to 12.3 on the two and more server In-reply-to: References: Comments: In-reply-to "Kumari, Jyoti" message dated "Fri, 26 Feb 2021 14:26:16 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <287553.1614357336.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 26 Feb 2021 11:35:36 -0500 Message-ID: <287554.1614357336@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Kumari, Jyoti" writes: > connection to database failed: FATAL: could not read block 12 in file "= base/1/1259": read only 0 of 8192 bytes. Looks like your template1 database is corrupt. I think you could get out of this by dropping template1 and re-creating it from template0. However, the usual caveats for working with damaged databases apply: it's a good idea to make a filesystem-level backup of the entire database directory before you do anything. That way you can at least get back to where you were if things go further wrong. regards, tom lane