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 1mGmAJ-0001tm-Mz for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Aug 2021 17:49:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mGmAG-0004ap-Dh for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Aug 2021 17:49:16 +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 1mGmAF-0004ah-Oe for pgsql-hackers@lists.postgresql.org; Thu, 19 Aug 2021 17:49:16 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mGmAC-0004VX-Up for pgsql-hackers@lists.postgresql.org; Thu, 19 Aug 2021 17:49:14 +0000 Received: by mail-pj1-x1034.google.com with SMTP id j1so5469008pjv.3 for ; Thu, 19 Aug 2021 10:49:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=n9zW1PP0AF2ze33j7/R0O5DqPLOT7uJwjlDKwm/xNUI=; b=NEOqLucKWAb1LkYS3lch9s6tRtMPp4RftGGYZpDQLSVg13qHoEUwihUt6yTukKWty9 XjrqvB5rkBqFop/mXMRK9745YLpfMGpFU3azFQP8/FbpsEmm1X+PvUFwOQwcTrn2jLpB FLN4SfOKAFvVchr9UOGAjuw/M6LH56thX1f5ZdekuYW1GSa7v+wpbLJjlDo52vZZNaZE 5n+LCHg/fptUiFknq89FdXrPYwBhIv0BqEtjAbOKHb7awlgp+rQ6tNZvXuXfxlOxAydT mD6ejk8HcHEGRwITPG7Aa46u5igrluRcTFDMVeutXx0IN/xG7PgggV29wBekkEMHtN2A M0pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=n9zW1PP0AF2ze33j7/R0O5DqPLOT7uJwjlDKwm/xNUI=; b=kynSV/XKX68FtYS7Dis4TKTDDAaRJJjtZWr20p86Y6YontQFNWPC9+lNP6uiqTz6VY wVnVLowewid47nG8P7WxZ2w9iWbyLHp+tYxatMfLxFp7CmAgpJYTmcf9V/oblppJcp1A RtnBIlyT4xxpIx+T4dFlVv36w9ndhAKWevhGKu8mUE9PmngKm8JtSjmNO+4ENA8D4D+0 LCUt/ZP0B2kjuWblMeMkHllStBXTfF2Pl9q1idhT94uFtqPpjCMA+NNf0n8OoAiU95Yx AkTv+j0zB0VTgCBicGyxVG8iv9/MlHq7+nTq72ky1LpP962hDuxMcxdLAgTxoL41rmwc sNxA== X-Gm-Message-State: AOAM5315LHMbG/9tjw4deOyntBwSVFRUjpmkkoDLvA7VnNVgjz31ct4G Q7Jb0rc/nI92z355v0zD9AyUknao0/nyFenvL0yQOvXGMJjQ0v+ijSYKsJz56ycyETlsEjw7vl8 MYOP+SmVzEHvcXKSM9ci56KgEmPUODifDaYlM+Mt94S/BANo2IK8/n0UqFBTuNk3Za/RAH3WSq3 G5mwZ9MID8G0/D2wDSxUDrsfIqxglhb0P0SPkb2x0Cr9GzVaqPuO8t X-Google-Smtp-Source: ABdhPJzhARS1+BCsAaGc64ALFp8sRYo2sUWcrNRWdUwS+maFEarkLAJYyNCd0++JQOgKQWpins94rA== X-Received: by 2002:a17:902:aa47:b029:12d:693f:14a0 with SMTP id c7-20020a170902aa47b029012d693f14a0mr12728558plr.68.1629395351349; Thu, 19 Aug 2021 10:49:11 -0700 (PDT) Received: from laptop280-ma-us.hitronhub.home (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id b20sm3949865pfl.9.2021.08.19.10.49.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Aug 2021 10:49:11 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: reporting TID/table with corruption error From: Mark Dilger In-Reply-To: <924415DA-A514-4B67-AC66-E3D6C5F13F89@yandex-team.ru> Date: Thu, 19 Aug 2021 10:49:09 -0700 Cc: Peter Geoghegan , Alvaro Herrera , Pg Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <202108191637.oqyzrdtnheir@alvherre.pgsql> <924415DA-A514-4B67-AC66-E3D6C5F13F89@yandex-team.ru> To: Andrey Borodin X-Mailer: Apple Mail (2.3608.120.23.2.7) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Aug 19, 2021, at 10:17 AM, Andrey Borodin = wrote: >=20 > It would be great to see relation, block, offset, xmin\xmax and, = probably, flags whenever ERRCODE_DATA_CORRUPTED\ERRCODE_INDEX_CORRUPTED = is used. Iif it's possible to extract this information, of cause. This = is needed especially in amcheck functions. blockno, offnum and attnum are already included in every result for = amcheck functions over heap relations, though attnum may be null if the = corruption is not specific to any particular column. xmin, xmax and various flags may occur in the corruption message if they = are relevant, but they are not always present. There was some disagreement during the development of verify_heapam on = this point. We went with the idea that the user could find and inspect = the corrupt data with another tool if they had the (blockno, offnum, = attnum) information. As such, it wasn't necessary to include all the = data in the output. It shouldn't be too complicated to have a second interface that returns = all of the 23 byte main table tuple header information and also the 23 = byte toast tuple header (when relevant) along with the corruption = message. The guts of the corruption check would be shared between the = two interfaces. I haven't tried writing a patch yet, but it seems the = patch shouldn't be terribly complicated. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company