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

From Kevin Grittner
Subject Re: jsonb format is pessimal for toast compression
Date
Msg-id 1407611436.2988.YahooMailNeo@web122302.mail.ne1.yahoo.com
Whole thread Raw
In response to Re: jsonb format is pessimal for toast compression  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: jsonb format is pessimal for toast compression  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Stephen Frost <sfrost@snowman.net> writes:

>> Trying to move the header to the end just for the sake of this
>> doesn't strike me as a good solution as it'll make things quite
>> a bit more complicated.

Why is that?  How much harder would it be to add a single offset
field to the front to point to the part we're shifting to the end?
It is not all that unusual to put a directory at the end, like in
the .zip file format.



>> Is there a way we could interleave the likely-compressible user
>> data in with the header instead?
>
> Yeah, I was wondering about that too, but I don't immediately see
> how to do it without some sort of preprocessing step when we read
> the object (which'd be morally equivalent to converting a series
> of lengths into a pointer array).

That sounds far more complex and fragile than just moving the
indexes to the end.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Proposal to add a QNX 6.5 port to PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: jsonb format is pessimal for toast compression