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 1lHG8o-0004wk-3H for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Mar 2021 01:17:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHG8n-0000Y7-1w for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Mar 2021 01:17:29 +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 1lHG8m-0000Y0-Mo for pgsql-hackers@lists.postgresql.org; Wed, 03 Mar 2021 01:17:28 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lHG8j-0006eT-Ax for pgsql-hackers@lists.postgresql.org; Wed, 03 Mar 2021 01:17:28 +0000 Received: by mail-ej1-x632.google.com with SMTP id gt32so27442984ejc.6 for ; Tue, 02 Mar 2021 17:17:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vMybhDlhLql1+Zg526JELcfB24mYu9HDKXNSTYjkvC4=; b=q0v0dayKwMZdTjobcwAS/4HOT4C5wBDluAh6kARVSmaq39OO1vSgiRR+OxCoBBTXTv uzIpvEk2kGd+gjmEMVs15IH3wlAN/RB47CBe6hwM5daeDYmvMitJYO9nnYbY18K2pTRV HAuZWDCd/P3X8TR/Kj7R+rj21FiC46FhRoIYHybjaag3kXmEbTNaNodH1uMf/7X+W9yp 4WrPifhhgsEHx2tJNtWGYsW/TYNspiVQoJRYadoaQhsj9EcpjaCORB0HPS6AGc9QB1Ho LU9WCFBfDDYJL1sr7XkNIsrAiHNKJGVDO0WIE2jmCcBcobqpPyQ8esD90iQuJ/fiDu0x VauQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vMybhDlhLql1+Zg526JELcfB24mYu9HDKXNSTYjkvC4=; b=L6vx8T75PhZHtTBUM3sZ+OUA2xX+EACsaEINbU8SAbHhFcik86V9RJ/tBrLmfXKGaP Po1KGozBok6ObX7dx0zj22xUAoNLmu3wi4QiUoQsATsPhJshqW3tG9l3WgXZOw+V3yr1 0KOQ8Tn2Gaj8/zwzywXtnjn3i/IxSjBW8XiQ8TFrBICh7AiUfmx55kzLA/wbi6g7yr9t JsnLUJKNZIQTGq72eEbT6vxtKj8vEPLwOE/H7drVlM205T022pdbVJTZnoNQnCBd6qGL SOLA1w+0M0xKXxuUo8ldaYDRBCcZR3tPjEDQVmo7zvqtYto7VmJzXt3BjGUeilExpPUN S5gw== X-Gm-Message-State: AOAM532OxWn9HN80dsy27Nz+aKRP7yC3Hm4c5s1t8my3RIsZnSZYx1IA xl2FDhTDkxL01iOyoRlugM0V3f0O3fPbJWZMF/G4cCrrGxnctKGd75CMRf/XIvPfOAifXp8NaU0 NX8H1b1pGqF28NrSmnV/GlAuaoY1G6Iok+0YKmyCXuYRifiVqaJ5mjrhglrL3/DLD+xMD4Apck2 Tif4+H3CDsnbfwN6QypmIj/tDVj/sDZ7iPkmcWCZCiyQX8eyX69RTUVR98JKNfD6EMNBoHvO6QD ODD1SjGpmw5wEp9yZr+UUPRS6sFWhpdj9LITY2xlqeUPxtgl8iSFQ== X-Google-Smtp-Source: ABdhPJyU0sTJWbIWMwBXgR5ZA0vw/7Y3rU0eQW78qWPEVmR0RnnK9ws0txLm9gdQnqs6nweAtl/QHA== X-Received: by 2002:a17:906:3881:: with SMTP id q1mr23444858ejd.490.1614734242437; Tue, 02 Mar 2021 17:17:22 -0800 (PST) Received: from [10.137.0.4] (ip-86-49-253-127.net.upcbroadband.cz. [86.49.253.127]) by smtp.gmail.com with ESMTPSA id gb4sm1119473ejc.122.2021.03.02.17.17.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 17:17:21 -0800 (PST) Subject: Re: WIP: BRIN multi-range indexes To: Alvaro Herrera Cc: John Naylor , PostgreSQL Hackers References: <20210303001725.GA1766@alvherre.pgsql> From: Tomas Vondra Message-ID: <23a0a854-8f1a-e965-7121-f76b1b2fc271@enterprisedb.com> Date: Wed, 3 Mar 2021 02:17:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210303001725.GA1766@alvherre.pgsql> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Precedence: bulk On 3/3/21 1:17 AM, Alvaro Herrera wrote: > On 2021-Mar-03, Tomas Vondra wrote: > >> That's kinda my point - I agree the size of the patch is not the >> primary concern, but it makes the minmax/inclusion code a bit more >> complicated (because they now have to loop over the keys), with >> very little benefit (there might be some speedup, but IMO it's >> rather negligible). > > Yeah, OK. > >> Alternatively we could simply remove the code supporting the old >> API with "consistent" functions without the additional parameter. >> But the idea was to seamlessly support existing opclasses / not >> breaking them unnecessarily (I know we don't guarantee that in >> major upgrades, but as they may not benefit from this, why break >> them?). It'd simplify the code in brin.c a little bit, but the >> opclasses a bit more complex. > > Well, I doubt any opclass-support functions exist outside of core. Or > am I just outdated and we do know of some? > I'm not aware of any. This was proposed by Nikita Glukhov: https://www.postgresql.org/message-id/49cb668f-d6f9-3493-681d-7d40b715ef64%40postgrespro.ru Alexander Korotkov seemed to agree with Nikita, but I don't recall any references to actual existing opclasses. Then again - the amount of code to support two signatures is fairly small. If we decide to get rid of it, then fine - but the new complexity in minmax/inclusion likely exceeds that. Which is why I was thinking about still supporting both signatures, but reverting the changes in brin_minmax and brin_inclusion. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company