Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WiPRn-0007cG-0j for pgsql-hackers@arkaria.postgresql.org; Thu, 08 May 2014 14:37:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WiPRm-00051K-FW for pgsql-hackers@arkaria.postgresql.org; Thu, 08 May 2014 14:37:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WiPRl-00050A-96 for pgsql-hackers@postgresql.org; Thu, 08 May 2014 14:37:17 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WiPRi-0008KA-9R for pgsql-hackers@postgresql.org; Thu, 08 May 2014 14:37:17 +0000 Received: from anarazel.de (p54AF491E.dip0.t-ipconnect.de [84.175.73.30]) by mrelayeu.kundenserver.de (node=mreue105) with ESMTP (Nemesis) id 0Lwqt6-1WtMj41nTs-016RHs; Thu, 08 May 2014 16:37:06 +0200 Received: by anarazel.de (Postfix, from userid 1000) id C9E0E102A29; Thu, 8 May 2014 16:37:05 +0200 (CEST) Date: Thu, 8 May 2014 16:37:05 +0200 From: Andres Freund To: Bruce Momjian Cc: Tom Lane , "David E. Wheeler" , Greg Stark , Robert Haas , Heikki Linnakangas , Andrew Dunstan , Peter Geoghegan , "pgsql-hackers@postgresql.org" Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) Message-ID: <20140508143705.GA1703@awork2.anarazel.de> References: <20140422223230.GL10046@momjian.us> <16527.1398214220@sss.pgh.pa.us> <20140506201048.GI30817@momjian.us> <16769.1399407530@sss.pgh.pa.us> <20140506212020.GK30817@momjian.us> <57E8AA44-F816-45F2-BB61-5A854FFB0A97@justatheory.com> <28554.1399414853@sss.pgh.pa.us> <20140508134701.GO30817@momjian.us> <5819.1399558614@sss.pgh.pa.us> <20140508143404.GP30817@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140508143404.GP30817@momjian.us> X-Provags-ID: V02:K0:+FZwk8Fc8ZFrjxz0AXVH7xaxIgA3dlT1MHJHqWgb6Gu zwlWpbXajc6vVLVtOtA2yHxrSrcB918ZzAAQaL5UIzzUYOUj37 XXGvkGtG0wdtCS+PWfvatvkrIFwx4n5SDhXmRTbigER0oItJVp AHbCrGIS//oKEm5/q2L5MdnI9ey/hgWV5y9WDfY70c2gohw9Qu tH6YVIjutfl4Yb7VbMLk6hIiZYTWeVhgoo2xcnIkvigUpHY2R1 eNJDNXuScQpnwMqYSJEN+zS629/FZd7R6DldklAY5rbkjzP0v7 x9LNeGjrhJFP25pRWdTHtyf/Xzn+P/Cv3HCrKdVXf3EDwuvV3b +XJ0NysZ+9KpBKdpahTUBkVTWWnzqS13oOsjR1nR2 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 2014-05-08 10:34:04 -0400, Bruce Momjian wrote: > On Thu, May 8, 2014 at 10:16:54AM -0400, Tom Lane wrote: > > > Can we hash just the values, not the keys, in jsonb_ops, and hash the > > > combo in jsonb_hash_ops. That would give us key-only lookups without a > > > recheck. > > > > No, because there's nothing in JSON limiting the length of keys, any more > > than values. > > > > I think the idea of hashing only keys/values that are "too long" is a > > reasonable compromise. I've not finished coding it (because I keep > > getting distracted by other problems in the code :-() but it does not > > look to be very difficult. I'm envisioning the cutoff as being something > > like 128 bytes; in practice that would mean that few if any keys get > > hashed, I think. > > Yes, that would be nice. Ideally we would not be doing this so close to > beta, but it is what it is, and if we need to break binary compatibility > after beta1, at least we have pg_upgrade. If we break binary compatibility pg_upgrade won't be able to help. Since the data files wont be, err, binary compatibile. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers