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 1julsf-0004XB-UA for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Jul 2020 23:59:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1juls9-0002eY-18 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Jul 2020 23:59:05 +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 1juls8-0002eR-My for pgsql-hackers@lists.postgresql.org; Sun, 12 Jul 2020 23:59:04 +0000 Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1juls4-0001w7-3x for pgsql-hackers@postgresql.org; Sun, 12 Jul 2020 23:59:04 +0000 Received: by mail-qv1-xf42.google.com with SMTP id m8so5055192qvk.7 for ; Sun, 12 Jul 2020 16:58:59 -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:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=dDLOTf8fbGn5hA6OTKv0hQZ7HdNZVrWL8UCrdoPRL1s=; b=tzZZ7Z6jFsHjb49QZE1WW4bm8nJhIxvy0CfBYgdpeX60417cZc2WeJ9NmflMzL0fjL zEbxZ/hyobKLmcXVkWw4+6MwUgWFvrJ1o1Id76qdHizqwHD5GyrnelOaTRwkwJRNV4e2 /4I6jhGBRppRS/AOgGLqPZLSrWYu/LMNiPfQjEloqQGkuQg/VQHwFOJzprfY/o290xpB swHrGWTIkO/NEFvic3N0QeTPKUUNXNi+1i4k0naTzar3pQrpscbAjMj6BbHbDJmhdQHk u9oda7b0twqDmEDo5Vcn5Z0U5rP9+FmiPQhwAP311Oft9QNHDYCol9A7MwIE/GhKEwwz GJGw== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=dDLOTf8fbGn5hA6OTKv0hQZ7HdNZVrWL8UCrdoPRL1s=; b=M2uPTPFKr7/4/ho8Ix3a2vLl9AP5kt/sHV/fyDZb6D6IleYldWebLVg7tkiLDfOfUO VFuV1dVDLl3D2c2B/sogDn1M9M2dT3lAA4i+7K9vQh6xr1yhUkFfX6UzXH/4boczgU31 RsdMrLeaZ7fpErNaZPoT0f0LOaj9pOPHHPHAur4n988lWv5jrXBWT0O2ySnP4nZ74++X ocUwbCOSGswnq4SlvFTgEkRj+sIxM5VsMq5+0m+gHB2s+2YFh9dyLJnn+vSexxIeF5vs xFwT8lw61XIsdm41ZpQw/kF5yQMt2ei7d+CpjJbPA1lz5DVbLRpfQFn911/Ub2RxcYCM JgUg== X-Gm-Message-State: AOAM532KthLTHvVa0OgoN8gGfJb0dvJ6YE4fwAo3u9JrvwJ6D1Rek7SW OlASJTBhz3ML2W90BcneQDNeSQ== X-Google-Smtp-Source: ABdhPJz44AgnJvQPRS+oZ7XjK2UNdM0m0VHG6++110dIVntiJ4SX2O5P+0ncK/4zYAGYp2yar2d1rA== X-Received: by 2002:ad4:4e07:: with SMTP id dl7mr76227678qvb.134.1594598337983; Sun, 12 Jul 2020 16:58:57 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id r7sm16360198qtm.66.2020.07.12.16.58.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2020 16:58:57 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 009072A18A9; Sun, 12 Jul 2020 19:58:54 -0400 (-04) Date: Sun, 12 Jul 2020 19:58:54 -0400 From: Alvaro Herrera To: Tomas Vondra Cc: Masahiko Sawada , Alexander Korotkov , Michael Paquier , Tom Lane , Andres Freund , Mark Dilger , pgsql-hackers Subject: Re: WIP: BRIN multi-range indexes Message-ID: <20200712235854.GA21540@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200710120914.6kydpi3kfr2icpfq@development> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. (I don't know what's a good way to represent a bloom filter, mind.) -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services