Re: [HACKERS] MAIN, Uncompressed? - Mailing list pgsql-hackers

From Greg Stark
Subject Re: [HACKERS] MAIN, Uncompressed?
Date
Msg-id CAM-w4HNMBKUQSxvTAeT571NJqaUFdoT+fk0kR8AbSYjaovPoew@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] MAIN, Uncompressed?  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: [HACKERS] MAIN, Uncompressed?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 25 August 2017 at 19:59, Simon Riggs <simon@2ndquadrant.com> wrote:
>
> On 25 August 2017 at 14:08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> > Maybe, but the use case seems mighty narrow.
>
> JSON blobs between 2kB and 8160 bytes are very common.
>
> String length is maybe a poisson distribution, definitely not uniform.


But JSON blobs should be highly compressible. Even jsonb will be quite
compressible.

That said I always found remembering the mapping from these names to
various behaviours to be quite hard to use. I would have found it far
more useful to have two separate properties I could set "compress" and
"external" or perhaps even more useful would be to set some kind of
guideline size threshold for each (and perhaps a second size compress
threshold and external threshold for the whole tuple).

I think this is a particularly old piece of code and we're lucky the
default heuristics have served well for all this time because I doubt
many people fiddle with these storage attributes. The time may have
come to come up with a better UI for the storage attributes because
people are doing new things (like json) and wanting more control over
this heuristic.

For what it's worth I think a good start would be to give people more
visibility into what the tuptoaster heuristic is actually doing to
their data and that will encourage people to give feedback about when
they're surprised and are frustrated by the existing UI.


-- 
greg



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: [HACKERS] Release plans: near-term update releases, and 10.0
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] MAIN, Uncompressed?