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 1jgrX0-0002r4-Qc for pgsql-admin@arkaria.postgresql.org; Thu, 04 Jun 2020 15:11:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jgrWz-0002kM-0b for pgsql-admin@arkaria.postgresql.org; Thu, 04 Jun 2020 15:11:45 +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 1jgrWy-0002kF-OF for pgsql-admin@lists.postgresql.org; Thu, 04 Jun 2020 15:11:44 +0000 Received: from mout.perfora.net ([74.208.4.194]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgrWw-0000sG-Ep for pgsql-admin@postgresql.org; Thu, 04 Jun 2020 15:11:43 +0000 Received: from [IPv6:2607:fb90:6429:bb35:8116:5044:e82f:ee22] ([172.58.188.114]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPA (Nemesis) id 1MgwK1-1j220E1VTZ-00hLir; Thu, 04 Jun 2020 17:11:39 +0200 Content-Type: multipart/alternative; boundary=Apple-Mail-5479CA5B-26FE-4675-83E9-69197D8C4077 Content-Transfer-Encoding: 7bit From: "MichaelDBA@sqlexec.com" Mime-Version: 1.0 (1.0) Subject: Re: Block corruption Error. Date: Thu, 4 Jun 2020 11:11:37 -0400 Message-Id: References: Cc: vinod kale , pgsql-admin In-Reply-To: To: Jeff Janes X-Mailer: iPhone Mail (17E262) X-Provags-ID: V03:K1:gLNnl69vTTCXjmALJNWjg0EJBZrVoQRG1dmA80eE46hB57lhT2v l6Fmv5Bgs6Oh/p/yIeFr63C3+xydjfYruoMlxP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 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail-5479CA5B-26FE-4675-83E9-69197D8C4077 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Loop thru the affected tables using primary key or ctid and catch exception r= ows and delete them Sent from my iPhone > On Jun 4, 2020, at 10:50 AM, Jeff Janes wrote: >=20 > =EF=BB=BF >> On Tue, Jun 2, 2020 at 11:11 AM vinod kale wrote: >=20 >> Hello Team, >>=20 >> We have generated one scenario for learning purpose regarding block corru= ption.=20 >> We have manually corrupt the one table file at disk level and after queri= ed to that table we got below attached error. >> So could you please help me out in below scenario? >> What is the best method to resolve below error. ? >=20 > I don't understand what you are asking. You intentionally created corrupt= ion, so now you have corruption. Restore from a backup plus archived WAL fi= les, or promote your standby, or do whatever your recovery plan dictates. >=20 > Of course you could just edit the file and reverse whatever it is you did (= while the db is shutdown), but that would not constitute a plan. >=20 > Cheers, >=20 > Jeff --Apple-Mail-5479CA5B-26FE-4675-83E9-69197D8C4077 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Loop thru the affected tables using primary= key or ctid and catch exception rows and delete them


Sent from my iPhone

On Jun 4, 2020, at 10:50 AM, Jeff Janes <jeff.janes@gmail.com> wrote= :

=EF=BB= =BF
On Tue, Jun 2, 2020 at 11:11 AM vinod k= ale <vinod16895@gmail.com>= wrote:
Hello Team,

We have generated one scenario for learning purpose regardin= g block corruption. 
We have manually corrupt th= e one table file at disk level and after queried to that table we got below a= ttached error.
So could you please help me out in bel= ow scenario?
What is the best method to resolve below= error. ?

I don't understand wha= t you are asking.  You intentionally created corruption, so now you hav= e corruption.  Restore from a backup plus archived WAL files, or promot= e your standby, or do whatever your recovery plan dictates.

Of course you could just edit the file and reverse whatever it is y= ou did (while the db is shutdown), but that would not constitute a  pla= n.

Cheers,

Jeff
= --Apple-Mail-5479CA5B-26FE-4675-83E9-69197D8C4077--