Re: jsonb format is pessimal for toast compression

From: Jan Wieck <jan(at)wi3ck(dot)info>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: jsonb format is pessimal for toast compression
Date: 2014-09-24 05:02:44
Message-ID: 54225074.4040303@wi3ck.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/15/2014 09:46 PM, Craig Ringer wrote:
> On 09/16/2014 07:44 AM, Peter Geoghegan wrote:
>> FWIW, I am slightly concerned about weighing use cases around very
>> large JSON documents too heavily. Having enormous jsonb documents just
>> isn't going to work out that well, but neither will equivalent designs
>> in popular document database systems for similar reasons. For example,
>> the maximum BSON document size supported by MongoDB is 16 megabytes,
>> and that seems to be something that their users don't care too much
>> about. Having 270 pairs in an object isn't unreasonable, but it isn't
>> going to be all that common either.
>
> Also, at a certain size the fact that Pg must rewrite the whole document
> for any change to it starts to introduce other practical changes.
>
> Anyway - this is looking like the change will go in, and with it a
> catversion bump. Introduction of a jsonb version/flags byte might be
> worthwhile at the same time. It seems likely that there'll be more room
> for improvement in jsonb, possibly even down to using different formats
> for different data.
>
> Is it worth paying a byte per value to save on possible upgrade pain?
>

This comment seems to have drowned in the discussion.

If there indeed has to be a catversion bump in the process of this, then
I agree with Craig.

Jan

--
Jan Wieck
Senior Software Engineer
http://slony.info

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-09-24 05:10:12 Re: jsonb format is pessimal for toast compression
Previous Message Gregory Smith 2014-09-24 04:02:10 Re: Scaling shared buffer eviction