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 1uZ7cT-00GO8x-Qq for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Jul 2025 12:40:21 +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 1uZ7cR-007uwX-SM for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Jul 2025 12:40:20 +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 1uZ7cR-007uwP-Is for pgsql-hackers@lists.postgresql.org; Tue, 08 Jul 2025 12:40:20 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uZ7cQ-006Dn3-1w for pgsql-hackers@lists.postgresql.org; Tue, 08 Jul 2025 12:40:19 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-712be7e034cso36861707b3.0 for ; Tue, 08 Jul 2025 05:40:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751978418; x=1752583218; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Mj5CsJI0cRR8VBaoPp+py+nvnzP1fk3LTjsFOaBOmSU=; b=MzIkGOKRmYdnT7u6NvzzWRFPvB7BCZjC1qh1TBWv4Is30SIU7eTCUtdLscbV9xZNkC MSrgYSvQgTbNWQh1mRpLAbYVAYdIrvKt4srIZu9CF5MpQ/Zrap99IkOsBNezWu6BAREx TNamRppIDVp6FrotR1DtKPyuwbzXopHxGrJB7rPGwV4LtiBU/3wf1xYFDE2zbCD+Nr5c 3Awlx5FajXViPUT8eqLyBlAEc1y9h4+MemFqVSk5QbJrM9mfID0uHU1wDd4TqlB5oXzA 6TpFy7uH9NmA628kmerkAjtk5Dk4Vab8lJ3j5We8jy/kh+kdG2EKRZkCSj5eyrBGYboa qsdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751978418; x=1752583218; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mj5CsJI0cRR8VBaoPp+py+nvnzP1fk3LTjsFOaBOmSU=; b=HXQOK3cZ6mXNNcT1KVw5CyU4UaWFjzogb3/1gruJaw9aHd1xuqxG4acy9HvIcrOTEY zd+B7fXpI7sVV1Ia70X/HSsMUSP0eHYHBTKms39hTlbuyj+xNMmFL7hWr/kQuI3hCZt8 HXxRrAx5N2eXxW1bked2hP4m5A6sfBW3DThiAzjOpzqJ3NXIoURFqURwGVY4mMADpESs /rD0ZDSq9moR9jRiF08TWUOhoNNx7WOZ4tqV0/+Lvl6RHaqux3ZjmW++A3PZ1Le3/u/E UhAx9cvR5+wDwbeiJk/aZozwAKfr4hlBFchqvcgiTy8U3SxRlJKVHi3hu07zz5DHlJCG eGJQ== X-Forwarded-Encrypted: i=1; AJvYcCWWIApr4NJutjJ7zCwzxlIeE3aMPRiNq64iJ3QtdK9THYtOsnN5vo7lfnG7RCQ6k5D1xMTeTUjL7fqVQU2a@lists.postgresql.org X-Gm-Message-State: AOJu0Yw+1g7fGqAj1+V62m8SYGiPpHzBLRO4snVzlEnB+gDK2Nr68pry K23Sl5aUZJxY56MPIyylUkAUFP7fjNi0g0c9F14uKSRhIINk+pFaRjZeztCiXvATB8ZPoC6VjCI NDcmtEYOI4++Q+6KGyYHO2EUPfo8PNAGpOCn0954= X-Gm-Gg: ASbGncs2ZsAyTuV2G50VbvQoXEPO/pX+O9vCoXy3v5eKAqHc1jBjbyhSmZmAZJq1YQ1 Diwwm2a38eq2DGlPZD5qcmbHsjSpWK34mNThLdth1vrcnSMgxswd1e8jAQ2ltXnlrXolR4K00z2 lf0+6SWNVD5w61JqPka7Vf7SyuoXROg60mEdT14rEaLfyd X-Google-Smtp-Source: AGHT+IEQ25WNZgFO/2f/tLS07Zp3AyU0hdNLZLAqmgBkCcmVaSqrL3y1Id211Qq0YZTAsonBtHm/WP6cUf5DjyqGiso= X-Received: by 2002:a05:690c:6105:b0:70e:2cfb:1848 with SMTP id 00721157ae682-71668e382b1mr231939687b3.31.1751978417498; Tue, 08 Jul 2025 05:40:17 -0700 (PDT) MIME-Version: 1.0 References: <202507071221.am6rbd6n4dct@alvherre.pgsql> In-Reply-To: <202507071221.am6rbd6n4dct@alvherre.pgsql> From: Arseniy Mukhin Date: Tue, 8 Jul 2025 15:40:04 +0300 X-Gm-Features: Ac12FXz-ob4L4_e9HEsME-wOmsSGgOn6W3XiSJTuDCCUjTm1VzMhhCRqRCVzcU0 Message-ID: Subject: Re: amcheck support for BRIN indexes To: =?UTF-8?Q?=C3=81lvaro_Herrera?= Cc: Tomas Vondra , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 7, 2025 at 3:21=E2=80=AFPM =C3=81lvaro Herrera wrote: > > On 2025-Jul-07, Tomas Vondra wrote: > > > Alvaro, what's your opinion on the introduction of the new WITHIN_RANGE= ? > > I'd probably try to do this using the regular consistent function: > > > > (a) we don't need to add stuff to all BRIN opclasses to support this > > > > (b) it gives us additional testing of the consistent function > > > > (c) building a scan key for equality seems pretty trivial > > > > What do you think? > > Oh yeah, if we can build this on top of the existing primitives, then > I'm all for that. Thank you for the feedback! I agree with the benefits. Speaking of (=D1=81), it seems most of the time to be really trivial to build such a ScanKey, but not every opclass supports '=3D' operator. amcheck should handle these cases somehow then. I see two options here. The first is to not provide 'heap all indexed' check for such opclasses, which is sad because even one core opclass (box_inclusion_ops) doesn't support '=3D' operator, postgis brin opclasses don't support it too AFAICS. The second option is to let the user define which operator to use during the check, which, I think, makes user experience much worse in this case. So both options look not good from the user POV as for me, so I don't know. What do you think about it? And should I revert the patchset to the consistent function version then? Best regards, Arseniy Mukhin