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 1pVszl-0008Nr-7c for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Feb 2023 11:45: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 1pVszj-00044S-Nb for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Feb 2023 11:45: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 1pVszj-00044H-DH for pgsql-hackers@lists.postgresql.org; Sat, 25 Feb 2023 11:45:39 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pVszg-00061M-Um for pgsql-hackers@lists.postgresql.org; Sat, 25 Feb 2023 11:45:39 +0000 Received: by mail-wr1-x431.google.com with SMTP id j2so1713388wrh.9 for ; Sat, 25 Feb 2023 03:45:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=H40g/O/Q5hfywk+cnYllHEghSWTHAFAn9U+/dtEA1mM=; b=NR06i7sYOr8ouKtsljEi0cGIru0mCPAOLcvOzTZGqO8/SbY7obUDqVouvN1rx4Xd0g rZRRNiyPGW/OoegDicSsvyzhXsBlvRsvSzJxXcCv/F99VDl1dDCASd/c6COyHFB9C5z8 Gra5gpeiIVItLs+OF/rCBQpZs3rLZmBzZG/pzzIFbr5OHbepqWkpET2X4jCY0oIjXaqK Cj5PKmDnlHgpKVtt/a711uLy/fTBicYJFToLQTNO7d3V8VKCIa0FMnEffSFAVAHXlyQT pp5g7YwZCkS4JPvZ55Ea4rf1j3J9OPeG6kzAxAZ5kmAd/hUxiKRcdYmhq6erDCBfXjfS NRiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H40g/O/Q5hfywk+cnYllHEghSWTHAFAn9U+/dtEA1mM=; b=tHI7DOiksRUBXtxlvL45fiS7Au3L6wo5RQva58ceOyiv+JTAe4eM8D/m4K3Omhy70U So5r/aC12qTBA253Obd13TaLLby9O/NDeD3LFN26KHmA7kJ7mahBwoAbvj5S+bIdW7Un 6aMF/fFtF8ExHbN9dlOfVemsmz5PBoKhKndYK+S3/Jl7uVPE9b8iEY2KKgivVkP1IwXT J25B56nQp5kP3kASWviaGlxK1nbwqgzb89nJcDTV29MkJtqM+h8WEXpRP1WlhVkLLgub 6XjIAA3Iit4e04+p+eOD3q6P4tp5+qfsZq3FBu+FTZrrQeqABL3xkwQR0DHt/NM1HMOH Yigw== X-Gm-Message-State: AO0yUKUYGU8ag3/CrCdyhSnC+pyQeeIiCKt0dHjy6wFxit3wSK614RTE 8wbAT/IA0IrvtOQ03gIdHQRIRbUwC7ZY9uYapach0rxGHECwgiluXld5f3T4BzWCMyRaQaoG1Ax zS8Jqic9iACJlBmbX+j0ftdOofYpU4SX/u6PeBZhwKF7uFC4+IxOuFeRQMrqPqqr4lQGiJlQeBv hZJwEpUh6ff/MpPQdv7h3G+7BaxNP+IZH3BId7YNxPkLbEPTR2qzL6O2SSXsN3VKE= X-Google-Smtp-Source: AK7set/1CxVkScVD/YYqILkiX3qghRxmAkcBAdfiXoU7xKpwVE9/BRF0Rrt8o+Vat6z9P2qtQgcj+Q== X-Received: by 2002:a5d:4ccd:0:b0:2c3:eaff:aae7 with SMTP id c13-20020a5d4ccd000000b002c3eaffaae7mr16510465wrt.17.1677325535488; Sat, 25 Feb 2023 03:45:35 -0800 (PST) Received: from [10.137.0.17] (ip-86-49-228-162.bb.vodafone.cz. [86.49.228.162]) by smtp.gmail.com with ESMTPSA id e7-20020a5d5947000000b002c5a07e940csm1570121wri.33.2023.02.25.03.45.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Feb 2023 03:45:35 -0800 (PST) Message-ID: <4fa33caf-b5d1-6887-65a9-82ce9d92765c@enterprisedb.com> Date: Sat, 25 Feb 2023 12:45:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: BRIN indexes vs. SK_SEARCHARRAY (and preprocessing scan keys) Content-Language: en-US To: Heikki Linnakangas , 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: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 2/24/23 22:07, Heikki Linnakangas wrote: > 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. > Yeah, probably. I was trying to only do the minimal change because of (maybe) backpatching this. > 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? > True. I don't recall why we did it this way. >> 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? > No, not really. I simply wanted a random-looking data, but reproducible and deterministic. And linear congruential generator is a simple way to do that. I just picked a couple co-prime numbers, and that's it. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company