Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uRr8X-00HOvy-3R for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jun 2025 11:39:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uRr8V-000ymN-1n for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Jun 2025 11:39:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uRr8U-000ymF-Of for pgsql-hackers@lists.postgresql.org; Wed, 18 Jun 2025 11:39:23 +0000 Received: from forwardcorp1b.mail.yandex.net ([178.154.239.136]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uRr8S-002gud-15 for pgsql-hackers@lists.postgresql.org; Wed, 18 Jun 2025 11:39:22 +0000 Received: from mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net (mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net [IPv6:2a02:6b8:c10:4a1:0:640:2691:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTPS id 700E760C4F; Wed, 18 Jun 2025 14:39:16 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6bf:8080:18e::1:3c]) by mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id FdLjWe1FYiE0-RagkvXaV; Wed, 18 Jun 2025 14:39:16 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1750246756; bh=Z4Rhok4V0I19jAZ2GGEQn+YhgBtlzFff3CKa2bnKnBc=; h=Message-Id:To:Date:References:Cc:In-Reply-To:From:Subject; b=QH/Z/NNwiAsBIt6moNYwHDJlLRuCysv4x3cZ0QalviGZLIoVDLXI0ivMLMm/IlxJx SK/07qsoVNEwj4izu9+TT1/OwRIJDXqttfcr8aMJvwkh/oU2vNFgaeV8ZfDf9lzWn0 BzljvC25ig7YlvybolHFpy5oZzyj4ZYTkhvfeNVM= Authentication-Results: mail-nwsmtp-smtp-corp-canary-81.sas.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: amcheck support for BRIN indexes From: Andrey Borodin In-Reply-To: Date: Wed, 18 Jun 2025 14:39:05 +0300 Cc: PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <14D6E2AE-3813-4AC7-B42F-6D0E765D551C@yandex-team.ru> References: <0C842FA2-8ACF-4C81-9F0E-F0BDB479AC28@yandex-team.ru> To: Arseniy Mukhin X-Mailer: Apple Mail (2.3826.600.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 18 Jun 2025, at 11:33, Arseniy Mukhin = wrote: >=20 > Interesting, I used btree check as reference when started > writing brin check, and in btree check there 53 > ERRCODE_INDEX_CORRUPTED ereports and only 1 ERRCODE_DATA_CORRUPTED > ereport. So it was very hard to do, but I managed to pick the wrong > one. I wonder if this btree check ereport should also be changed to > ERRCODE_INDEX_CORRUPTED? It's there in a case of heapallindexes failure. I concur that = ERRCODE_INDEX_CORRUPTED is more appropriate in that case in = verify_nbtree.c. But I recollect Peter explained this code before somewhere in = pgsql-hackers. And the reasoning was something like "if you lack a tuple = in unquie constraints - it's almost certainly subsequent constrain = violation and data loss". But I'm not sure. And I could not find this discussion in archives. Best regards, Andrey Borodin.=