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 1k2yhQ-0006aM-69 for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Aug 2020 15:17:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k2yhP-0005ta-69 for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Aug 2020 15:17:55 +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 1k2yhO-0005tS-Uu for pgsql-hackers@lists.postgresql.org; Tue, 04 Aug 2020 15:17:54 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k2yhH-0000NK-UQ for pgsql-hackers@postgresql.org; Tue, 04 Aug 2020 15:17:54 +0000 Received: by mail-wm1-x329.google.com with SMTP id 9so3016101wmj.5 for ; Tue, 04 Aug 2020 08:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uCae/Ev7q4tOyo/oGH75tAXq9+DUzAbRiXxulxsuXX4=; b=rXfyZqrS5E3gUvmLA+oYFvMB6/tlB6WLkPkwORi9guPNUO0zHntVgBRDup2ev4MRrh 9zyTgSZvvErHVCtTNP2gIMHmkY65vJA8c2I7qUBHWmNNCEu4edSmAEX6vlmVUe2VLXCe EAmTlRWcfMacfL0LYT0qNwZpZCulDNuMLCNjotVyadGPxp50Q0l7ZwKrSLBt4ovR9XJc vS7cTqawsLTZjXa07B+l/gLMQ3MxVwdqplEsBQSFaYOiYXgyeJQQ0uqKMoppD+UFmUyY Z4vOMsug/0Ynw8sWW+7Vt3cZTmACvjRNRJRBPDeRkK4h+pypBdVo5g0zOcW7jXOImfee TEEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uCae/Ev7q4tOyo/oGH75tAXq9+DUzAbRiXxulxsuXX4=; b=GneUq07BhcoosrE/abfxja8/dHZgc7pxRx/PdX+WXqk4A9Wf2x2Wql7u9Va7v2aCXY LLR2J/ZPr0F2shi6hHyqO/kkidpWTV9pd0mOOuFI53CyAArdbllQucaOFVPSxfiZ1de0 xVjtg+tPV9z2f6Z3UFlC9hFkzVviSE7DvNbCOJVaW0yHzA3+9bhyT0JAaR1+fMENh4Lb fsNKzeZcaoea4mNAtTbgwaFBs3dN5sRARPkW1Z9yaW4RDEknt9FYU2y248B41eRo6RDB b5W+se8KdD2SZ9wGC4Cayslv0B54GkJ5Prb+vhnmSaOIWUhh6tXEcmTyBvcWDc7aGQbt humA== X-Gm-Message-State: AOAM532VAxPo5CXu2hu2NDcrNXLt91jgNea3dFs8WGVEtbYfApdY9F9w sq+LBmLQ5O/Un2eOd7v0gVxZHg== X-Google-Smtp-Source: ABdhPJzgp9Qjf2rhnXKzKpcN6oKLdRVbraZHBy4LQTvK400ej3qqPpDKsEc9T70M1NwNkKEPRirw5Q== X-Received: by 2002:a05:600c:258e:: with SMTP id 14mr4361798wmh.141.1596554266569; Tue, 04 Aug 2020 08:17:46 -0700 (PDT) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id s20sm4730733wmh.21.2020.08.04.08.17.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2020 08:17:45 -0700 (PDT) Date: Tue, 4 Aug 2020 17:17:43 +0200 From: Tomas Vondra To: Alexander Korotkov Cc: Masahiko Sawada , Alvaro Herrera , Michael Paquier , Tom Lane , Andres Freund , Mark Dilger , pgsql-hackers Subject: Re: WIP: BRIN multi-range indexes Message-ID: <20200804151743.dbobvzovtnpgfpn7@development> References: <20200713001419.te5aozy7o76ff2vk@development> <20200713003310.GA22495@alvherre.pgsql> <20200713145850.5skhxmqezswz2ovl@development> <20200719151945.p6iaexethuplxxic@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Aug 04, 2020 at 05:36:51PM +0300, Alexander Korotkov wrote: >Hi, Tomas! > >Sorry for the late reply. > >On Sun, Jul 19, 2020 at 6:19 PM Tomas Vondra > wrote: >> I think there's a number of weak points in this approach. >> >> Firstly, it assumes the summaries can be represented as arrays of >> built-in types, which I'm not really sure about. It clearly is not true >> for the bloom opclasses, for example. But even for minmax oclasses it's >> going to be tricky because the ranges may be on different data types so >> presumably we'd need somewhat nested data structure. >> >> Moreover, multi-minmax summary contains either points or intervals, >> which requires additional fields/flags to indicate that. That further >> complicates the things ... >> >> maybe we could decompose that into separate arrays or something, but >> honestly it seems somewhat premature - there are far more important >> aspects to discuss, I think (e.g. how the ranges are built/merged in >> multi-minmax, or whether bloom opclasses are useful at all). > >I see. But there is at least a second option to introduce a new >datatype with just an output function. In the similar way >gist/tsvector_ops uses gtsvector key type. I think it would be more >transparent than using just bytea. Also, this is the way we already >use in the core. > So you're proposing to have a new data types "brin_minmax_multi_summary" and "brin_bloom_summary" (or some other names), with output functions printing something nicer? I suppose that could work, and we could even add pageinspect functions returning the value as raw bytea. Good idea! >> >BTW, I've applied the patchset to the current master, but I got a lot >> >of duplicate oids. Could you please resolve these conflicts. I think >> >it would be good to use high oid numbers to evade conflicts during >> >development/review, and rely on committer to set final oids (as >> >discussed in [1]). >> > >> >Links >> >1. https://www.postgresql.org/message-id/CAH2-WzmMTGMcPuph4OvsO7Ykut0AOCF_i-%3DeaochT0dd2BN9CQ%40mail.gmail.com >> >> Did you use the patchset from 2020/07/03? I don't get any duplicate OIDs >> with it, and it's already using quite high OIDs (part 4 uses >= 8000, >> part 5 uses >= 9000). > >Yep, it appears that I was using the wrong version of patchset. >Patchset from 2020/07/03 works good on the current master. > OK, good. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services