Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h40YL-0004lh-Hy for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Mar 2019 09:52:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h40YK-00069h-CO for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Mar 2019 09:52:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h40YK-00069a-0G for pgsql-hackers@lists.postgresql.org; Wed, 13 Mar 2019 09:52:00 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h40YH-0002uI-BE for pgsql-hackers@postgresql.org; Wed, 13 Mar 2019 09:51:59 +0000 Received: by mail-wm1-x341.google.com with SMTP id e16so1157160wme.1 for ; Wed, 13 Mar 2019 02:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-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=fvkWtupoaiLxB5r8odgKI7SDdIw0OMBDO5at8ttKhk0=; b=OlEba6JESogHjEfYSzEMhgCQreC1jC9qOodiu6HOsswFQaUQk054ZgeMsjifkWoNF1 c6Da4gvPB29z8NQJy8XQIHmAYVTEaT+DdRWYuTl6zLg87WhszEAlkXwvM2rTPwi1+Yh5 91o/6/72D2pbn6vRBnxxwkoWVJTgmuW8uOu3e6ONQydLCBMB2EY+w2Okn8m3D+C/BsvZ /CwmsC08bGaFDueuy23NiarS863w8dQW6xmBt8tFePRWbfZgRv4034LymR5JCFc2VbbC 9PPy5R68sTICz1e6Fi9RRzwpA58kt4if8pjnrnY+5QYpuAGsybjW70fTB/TPBhF9r5mO qlfg== 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=fvkWtupoaiLxB5r8odgKI7SDdIw0OMBDO5at8ttKhk0=; b=WcGT8DHsv65ey+VJqCZ4pHCzIF3fpUQBXasORIQf88EZGt0eH3WUbeL3ILcrcL+tG4 xAhDqIPLdqU/vYvoUvyxEx6lp0Y98slgFnRPgom+6uMgT7eowXj/SBigJb8aSKuuJz8D QQY6EZkmmXyI34ctcznMscmg6WjEKlvfQTEPnivky7Iev/AWCKPBGaewIme8NOYaTk5k /vC8FmxLbHZ4ajuhTf5lp3VlW/xGsPv2gGzorFx/EGtShblG04zIywDJpNirkjKKRokd 82MLWeZ9a9GO9OZS7yBL1KTHl0+f8hKYC9y3P/vHnwFCN0VhOZSdN2EFrH2PlWNuA1mq pRcQ== X-Gm-Message-State: APjAAAWp+fICOsi1HeStlcOYLQzJDaF0rxZoBEoOwPDsQ/KdEbnidyHi tgl2X1LU/Y/ql3ICpIvp2eUxP2AdAOQVqjU/ozzV7w01kjiLuUz6lkppUpU/iaWIxzxEf+q4DsE 3DEinnS1ya9eUYFsiMKTRsbk3CY9ntDCF/fztzZ2ayVQAOjHJx1B3CWKVmQM96qAjxEc3w5wEa0 bnPJVB3MfdVaCY+Q== X-Google-Smtp-Source: APXvYqyBDwdVZTUv8fitddGPF78LurS3p0mSgQEQ27JQvbP2rCdTNbWB9HqeK0FA8TIaOcYoz+Algg== X-Received: by 2002:a1c:7809:: with SMTP id t9mr1523199wmc.78.1552470715571; Wed, 13 Mar 2019 02:51:55 -0700 (PDT) Received: from [10.137.0.17] (ip-86-49-253-144.net.upcbroadband.cz. [86.49.253.144]) by smtp.gmail.com with ESMTPSA id t8sm1810563wmi.21.2019.03.13.02.51.54 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 13 Mar 2019 02:51:54 -0700 (PDT) Subject: Re: WIP: BRIN multi-range indexes To: Alexander Korotkov Cc: Nikita Glukhov , Tom Lane , Andres Freund , Mark Dilger , Alvaro Herrera , pgsql-hackers References: <20180123200537.gfx5hxcp5k5hktpe@alvherre.pgsql> <821c4c1d-592e-8916-e323-04607b11777e@2ndquadrant.com> <104E8BB8-35FF-4AA8-9871-6AFF04E4CAF3@gmail.com> <0afde2fc-e160-004f-8fe2-c65302ac3760@2ndquadrant.com> <22674.1517874015@sss.pgh.pa.us> <3e924a4c-6ca0-cc10-aebb-5004fc002800@2ndquadrant.com> <20180302035538.gkqgtcv6kmn2cklw@alap3.anarazel.de> <18526.1519963686@sss.pgh.pa.us> <1c1c1ced-1f79-a0ee-e5cd-858ca3eb9d74@2ndquadrant.com> <49cb668f-d6f9-3493-681d-7d40b715ef64@postgrespro.ru> <90be37f9-07ea-0f90-4bc6-6bdb68f4f190@2ndquadrant.com> From: Tomas Vondra Message-ID: Date: Wed, 13 Mar 2019 10:51:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/13/19 9:15 AM, Alexander Korotkov wrote: > On Tue, Mar 12, 2019 at 8:15 PM Tomas Vondra > wrote: >>> 0001. Pass all keys to BRIN consistent function at once. >>> >>> I think that changing the signature of consistent function is bad, because then >>> the authors of existing BRIN opclasses will need to maintain two variants of >>> the function for different version of PosgreSQL. Moreover, we can easily >>> distinguish two variants by the number of parameters. So I returned back a >>> call to old 3-argument variant of consistent() in bringetbitmap(). Also I >>> fixed brinvalidate() adding support for new 4-argument variant, and fixed >>> catalog entries for brin_minmax_consistent() and brin_inclusion_consistent() >>> which remained 3-argument. And also I removed unneeded indentation shift in >>> these two functions, which makes it difficult to compare changes, by extracting >>> subroutines minmax_consistent_key() and inclusion_consistent_key(). >>> >> >> Hmmm. I admit I rather dislike functions that change the signature based >> on the number of arguments, for some reason. But maybe it's better than >> changing the consistent function. Not sure. > > I also kind of dislike signature change based on the number of > arguments. But it's still good to let extensions use old interface if > needed. What do you think about invention new consistent method, so > that extension can implement one of them? We did similar thing for > GIN (bistate consistent vs tristate consistent). > Possibly. The other annoyance of course is that to support the current consistent method we'll have to keep all the code I guess :-( regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services