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 1pVfI5-0005MZ-1S for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Feb 2023 21:07:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pVfI3-0001HU-UG for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Feb 2023 21:07:39 +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 1pVfI3-0001HK-Ks for pgsql-hackers@lists.postgresql.org; Fri, 24 Feb 2023 21:07:39 +0000 Received: from meesny.iki.fi ([2001:67c:2b0:1c1::201]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVfI1-0005pG-OG for pgsql-hackers@lists.postgresql.org; Fri, 24 Feb 2023 21:07:39 +0000 Received: from [192.168.1.113] (dsl-hkibng22-54f8db-125.dhcp.inet.fi [84.248.219.125]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 9759020118; Fri, 24 Feb 2023 23:07:33 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1677272853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0VqqYNXRNTuE7XBPm0sC75/RkLfSvoBonDfZhzmZhNU=; b=YI3EwUBREHpkoZ/JtqEpNIkVAnZs+tLhWn/1iHvSceMzZpyKd0qEot/MhF80jxRATrjOe6 NiAaF8cy59DsyNrgZnJptyr29BQTeL1fu7oyI+Gqp/ThRCyR7/HtKwMHgyQkDniQD2stLj HkM11LBAlR6CyreCY2dKsieJnfuLAqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1677272853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0VqqYNXRNTuE7XBPm0sC75/RkLfSvoBonDfZhzmZhNU=; b=XErGI3SUPqQaaEcSM9OF0KUygeWb45W9w/e+80G9GuzqFCjglfUA8CszQN9WNTkL/0Cr9g 3YQv8+nqmVzR2Kkt7DrVIWxWiluSor/u4c5z40ze9ZS5zbfg6pZNDrpBM3AiCBK7BF91aL h/xRw8tN7r4YudU1va/EzGMBmNr58nQ= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1677272853; a=rsa-sha256; cv=none; b=J5II2AnGDp2jlAiy5NEclzeJghSfG6/X529kyktCSgGLwtMH2hhy2ChLij6RQxCcWI3EW0 yyn3WwgyOowVZ0AQqyb1ccFsIsy3JlANZXCgtjGNGcVNU253WStrNGgh7E2zePW4KQCvfb MxO3GPiV/dUXzoatvqOvzLmmb2LDm94= Message-ID: Date: Fri, 24 Feb 2023 23:07:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: BRIN indexes vs. SK_SEARCHARRAY (and preprocessing scan keys) Content-Language: en-US To: Tomas Vondra , PostgreSQL Hackers References: <0e1f3350-c9cf-ab62-43a5-5dae314de89c@enterprisedb.com> <57020b2e-d9c9-9bc7-4892-b36d9bb07563@enterprisedb.com> <327064f1-276e-cb45-88c2-1ff498037cf5@enterprisedb.com> From: Heikki Linnakangas In-Reply-To: <327064f1-276e-cb45-88c2-1ff498037cf5@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I had a quick look at just the preliminary cleanup patches: > 0001-BRIN-bloom-cleanup-20230218.patch Looks good to me > 0002-BRIN-minmax-multi-cleanup-20230218.patch Looks good, although it would feel more natural to me to do it the other way round, and define 'matches' as 'bool matches', and use DatumGetBool. Not new with this patch, but I find the 'matches' and 'matching' variables a bit strange. Wouldn't it be simpler to have just one variable? > 0003-Introduce-bloom_filter_size-20230218.patch Looks good > 0004-Add-minmax-multi-inequality-tests-20230218.patch Looks good > +SELECT i/5 + mod(911 * i + 483, 25), > + i/10 + mod(751 * i + 221, 41) Peculiar formulas. Was there a particular reason for these values? - Heikki