Re: jsonb format is pessimal for toast compression - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: jsonb format is pessimal for toast compression
Date
Msg-id 5417965C.4070604@2ndquadrant.com
Whole thread Raw
In response to Re: jsonb format is pessimal for toast compression  (Peter Geoghegan <pg@heroku.com>)
Responses Re: jsonb format is pessimal for toast compression
List pgsql-hackers
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?

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Arthur Silva
Date:
Subject: Re: jsonb format is pessimal for toast compression
Next
From: Alvaro Herrera
Date:
Subject: Re: WAL format and API changes (9.5)