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 1jum7A-00053s-MI for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jul 2020 00:14:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jum78-0003Bp-HV for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Jul 2020 00:14:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jum78-0003Bh-7n for pgsql-hackers@lists.postgresql.org; Mon, 13 Jul 2020 00:14:34 +0000 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jum70-00056f-Jf for pgsql-hackers@postgresql.org; Mon, 13 Jul 2020 00:14:32 +0000 Received: by mail-ej1-x641.google.com with SMTP id y10so13525045eje.1 for ; Sun, 12 Jul 2020 17:14:26 -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=6zU1oGxYwoUpzkvJU+8ungkIDoBW7U+Jux/NLbZ5BV8=; b=HLgi6s3bOmJP0ERfpZxiS87vM3dWSQEB9HeFQWiJW5WH9If2V8tWKfFRNsEuMX1vzV NliMVNjx52nkXQtF0jIVj1Xuw1N+ZVKHyXlkcMGiCIDUsbuIYxNsV65s/zM1udHgqBmD aloV0tKZVE8dr7jfDcR5sL3ikaBF5my73VPXOELGBkShRObNKEcNf0BefZa1GwGVqoLw ydZM993ntLV/jxSbIVE4Y87BH3Y9JclWVquQgkiT6mncdX4qO5ZBG7O6asdiYSSu7Us0 zOBIvOnz4hXDLyZb3lEfVHIgM5bCHfFRSq8Uif1TWjYdDSOw0g5s2rguhvrr+UD/qKjM +GGw== 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=6zU1oGxYwoUpzkvJU+8ungkIDoBW7U+Jux/NLbZ5BV8=; b=jzHwXcyve7JT392ZMvf4Vg9t7b/sHIdxvXauWGwnrYY+4IjR2mDLx0TaUCIldizIG+ vCdGXYMoU4YIsqXmGQkD4cIZIWf1CEJ5whrEZSJ8KxDzhkP+HlNLIX9Gm6pcR3PUfJ1s AS1Jm9A+uP52X2FmkCpEEZK0KCTS7snaJlUgM/N9Jys8C0IIUM06/CtXMwg6N6ZB8mN3 A9XF51HpND3JnG5gDC553H1jeVUO4STnqHa5946bTnVLlkWc6UyMoz8D65zBP3rQ2rpr nR6NfnKwuEMiMqTZo43dj0XCCbMVh6f6xuiOZh9Jgpxrhpk+hoQed9L1qMMLU2C+I78S pvJQ== X-Gm-Message-State: AOAM532p2WNWOwSmBOkYNPWfSde1G6qRuJiio7ONsdisp9p9N3Qq/yIj YlXbCMKjFpq+mTwFb/gOUXAXKw== X-Google-Smtp-Source: ABdhPJxanCmZgUyZ01N7Kmc9H3oODHbRcxGUF5iiomwtrXpn4fGH6Ri36ECIXRW6T1XPSh4HSBcavg== X-Received: by 2002:a17:906:23e9:: with SMTP id j9mr59566522ejg.107.1594599264096; Sun, 12 Jul 2020 17:14:24 -0700 (PDT) Received: from localhost (ip-86-49-253-141.net.upcbroadband.cz. [86.49.253.141]) by smtp.gmail.com with ESMTPSA id 23sm10450741edw.63.2020.07.12.17.14.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2020 17:14:22 -0700 (PDT) Date: Mon, 13 Jul 2020 02:14:19 +0200 From: Tomas Vondra To: Alvaro Herrera Cc: Masahiko Sawada , Alexander Korotkov , Michael Paquier , Tom Lane , Andres Freund , Mark Dilger , pgsql-hackers Subject: Re: WIP: BRIN multi-range indexes Message-ID: <20200713001419.te5aozy7o76ff2vk@development> References: <20200710120914.6kydpi3kfr2icpfq@development> <20200712235854.GA21540@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200712235854.GA21540@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Jul 12, 2020 at 07:58:54PM -0400, Alvaro Herrera wrote: >On 2020-Jul-10, Tomas Vondra wrote: > >> > postgres(1:12801)=# select * from brin_page_items(get_raw_page('mul', >> > 2), 'mul'); >> > -[ RECORD 1 ]---------------------------------------------------------------------------------------------------------------------- >> > ----------------------------------------------------------------------------------------------------------------------------------- >> > ---------------------------- >> > itemoffset | 1 >> > blknum | 0 >> > attnum | 1 >> > allnulls | f >> > hasnulls | f >> > placeholder | f >> > value | {\x010000001b0000002000000001000000e5700000e6700000e7700000e8700000e9700000ea700000eb700000ec700000ed700000ee700000ef >> > 700000f0700000f1700000f2700000f3700000f4700000f5700000f6700000f7700000f8700000f9700000fa700000fb700000fc700000fd700000fe700000ff700 >> > 00000710000} >> >> Hmm. I'm not sure we can do much better, without making the function >> much more complicated. I mean, even with regular BRIN indexes we don't >> really know if the value is plain min/max, right? > >Maybe we can try to handle this with some other function that interprets >the bytea in 'value' and returns a user-readable text. I think it'd >have to be a superuser-only function, because otherwise you could easily >cause a crash by passing a value of a different opclass. But since this >seems a developer-only thing, that restriction seems fine to me. > Ummm, I disagree a superuser check is sufficient protection from a segfault or similar issues. If we really want to print something nicer, I'd say it needs to be a special function in the BRIN opclass. >(I don't know what's a good way to represent a bloom filter, mind.) > Me neither, but I guess we could print either some stats (size, number of bits set, etc.) and/or then the bitmap. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services