Re: jsonb format is pessimal for toast compression

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Claudio Freire <klaussfreire(at)gmail(dot)com>, "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>, Jan Wieck <jan(at)wi3ck(dot)info>
Subject: Re: jsonb format is pessimal for toast compression
Date: 2014-09-24 01:06:29
Message-ID: 646.1411520789@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)heroku(dot)com> writes:
> On Fri, Sep 19, 2014 at 5:40 AM, Heikki Linnakangas
> <hlinnakangas(at)vmware(dot)com> wrote:
>> I think we should bite the bullet and break compatibility with 9.4beta2
>> format, even if we go with "my patch". In a jsonb object, it makes sense to
>> store all the keys first, like Tom did, because of cache benefits, and the
>> future possibility to do smart EXTERNAL access. Also, even if we can make
>> the on-disk format compatible, it's weird that you can get different runtime
>> behavior with datums created with a beta version. Seems more clear to just
>> require a pg_dump + restore.

> I vote for going with your patch, and breaking compatibility for the
> reasons stated here (though I'm skeptical of the claims about cache
> benefits, FWIW).

I'm also skeptical of that, but I think the potential for smart EXTERNAL
access is a valid consideration.

I've not had time to read Heikki's updated patch yet --- has anyone
else compared the two patches for code readability? If they're fairly
close on that score, then I'd agree his approach is the best solution.
(I will look at his code, but I'm not sure I'm the most unbiased
observer.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Smith 2014-09-24 01:13:39 Re: "Core" function in Postgres
Previous Message Peter Geoghegan 2014-09-24 00:51:39 Re: jsonb format is pessimal for toast compression