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 1h0Bvt-000178-4z for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Mar 2019 21:12:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h0Bvp-0001O7-TH for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Mar 2019 21:12:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0Bvp-0001O0-9N for pgsql-hackers@lists.postgresql.org; Sat, 02 Mar 2019 21:12:29 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0Bvg-0001pH-JN for pgsql-hackers@postgresql.org; Sat, 02 Mar 2019 21:12:27 +0000 Received: by mail-wr1-x443.google.com with SMTP id o17so1431336wrw.3 for ; Sat, 02 Mar 2019 13:12:20 -0800 (PST) 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=VdjJ12n+C4mutxy0PN1tRtGvQq6ELxyacLyy1Amg5ZU=; b=GtekwQlB02V3Joqe8ZBKfi1795XXiZA8KTky1pxFUEpryd1bwpxWZoh4jLqYUlD4iI UGjlaVM4Ss49t4hq+E9sZl8bCXmCkTFEKpmTwzbGQpJp5SmoH8Ygrm7l2FLNCxZFUHcX xZzlkTUht/vg0z+63Geuf7TJ670kg6PUoRWJGIYWpwFlDd3f2kUNl7M0I2XgAJKfv/cT VJEShNT3ysclJXHsVye62DKnKetC60sICyXCx7z+sA7ELfku3Atxzl1vGBM2iPfDai0c Axde2EUS8vxaXfDrpUKXdIjVheuSqyfCMxP4du/O+TT+hpwyFCi/uAIaXn/t+C2FaR4v Ke1A== 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=VdjJ12n+C4mutxy0PN1tRtGvQq6ELxyacLyy1Amg5ZU=; b=TJnlM9L9Z8hoLLytpHHePfPZcJOw0ZHTPSqR0cj+n8cAaU8g4HUmU2J0UMadoIGdmx 20bdZDGuEG+hDVoCbN7cZuB/6MSNJ7j88a0lL8Q4QSKOSKVD4mdMi7dTvi+rigkPUcpI pg/XKYloLjbg/Q0H/QQ6OnWfWuqeBni3ouFQ0BjnDtSgvPw9KbZnVCqbOKF23goUYbG7 RJZGfZsFyMaYuEoLvZQExkV3rYHOtuRwsRYQXPITfof2FwzYA+3dPqzgJnafJyR/udKU Jbw4CfqWhLktdAPO1llBHyIZuHXYkpFrSpVUVv9gvTcB2SYBT34W8S2O8orCWGQcS9E4 ceNA== X-Gm-Message-State: APjAAAVObXKupB+8P4Qs4eI5q/cBjwThPCdL8RdYsTF/wANSbiFXb19G MZMgrM0sosZfwwYgykOHvTm4PuJncPbdKGKeb19u7m7g8yAdpQDLQE+o/ls2Jkv0AqZ2iGWIhMg iDfb2qog6cWa0OTRC+DHZRW6SJxyy5JYxgwDdhxTvNLS+ktVGZMBhHjp+xvqy0TpyzxAwusPIIQ Q47r/xIPonmCw= X-Google-Smtp-Source: APXvYqzmdL5D+2vrLDzy1eYhPqggJ0OBEEEi80gpY8NHFJ9Q2SH1Mv4j7olAyYjMVxx4IHYn+bRoHg== X-Received: by 2002:a5d:4702:: with SMTP id y2mr8348119wrq.149.1551561137764; Sat, 02 Mar 2019 13:12:17 -0800 (PST) Received: from [10.137.0.17] (ip-86-49-253-226.net.upcbroadband.cz. [86.49.253.226]) by smtp.gmail.com with ESMTPSA id i62sm1891712wmg.17.2019.03.02.13.12.16 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sat, 02 Mar 2019 13:12:16 -0800 (PST) Subject: Re: WIP: BRIN multi-range indexes To: Alexander Korotkov Cc: 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> From: Tomas Vondra Message-ID: Date: Sat, 2 Mar 2019 22:12:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 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/2/19 10:05 AM, Alexander Korotkov wrote: > On Sun, Mar 4, 2018 at 3:15 AM Tomas Vondra > wrote: >> I've been thinking about this after looking at 0a459cec96, and I don't >> think this patch has the same issues. One reason is that just like the >> original minmax opclass, it does not really mess with the data it >> stores. It only does min/max on the values, and stores that, so if there >> was NaN or Infinity, it will index NaN or Infinity. > > FWIW, I think the closest similar functionality is subtype_diff > function of range type. But I don't think we should require range > type here just in order to fetch subtype_diff function out of it. So, > opclass distance function looks OK for me, OK, agreed. > assuming it's not AM-defined function, but function used for > inter-opclass compatibility. > I'm not sure I understand what you mean by this. Can you elaborate? Does the current implementation (i.e. distance function being implemented as an opclass support procedure) work for you or not? Thanks for looking at the patch! cheers -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services