This patch lets you control 3 pg_lzcompress knobs on a per table basis
(note requires reloptions.patch)
compress_max_size: Controls the maximum size to be considered for
TOAST compression.
compress_min_rate: Minimum compression rate (0-100%) required for
TOAST compression to be used.
compress_success_by: if by this byte no compressible data found abort
compression.
Note this adds some documentation, but I was having a hard time coming
up with a good way to describe these. I'm also not very happy with
the names. I originally tried something like toast.max_input_size.
But decided later if we allow you to set toast attributes that might
be confusing. So help with verbiage and names is appreciated.
Also I only did those 3 because they seemed the 3 most useful things
someone would want to tune. Later if we need to we can export them
all and make them per column settings (and maybe you can pick a
compression algo or what not...) But I figured lets start small.
I thought about doing another cleanup patch to get rid of
PGLZ_Strategy_default and PGLZ_Strategy_always. Nothing uses the
later, and if we expose all the nobs nothing will use the first.
Comments?