[PATCH] ALTER TABLE SET (compress_max_size... = )
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?
Attachments:
compress_opts.patchapplication/octet-stream; name=compress_opts.patchDownload+111-22
Alex Hunsaker wrote:
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?
I think we need to live with the TOAST changes for at least one release
before we know what knobs we will need.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On Tue, Jan 6, 2009 at 06:43, Bruce Momjian <bruce@momjian.us> wrote:
Alex Hunsaker wrote:
This patch lets you control 3 pg_lzcompress knobs on a per table basis
(note requires reloptions.patch)I think we need to live with the TOAST changes for at least one release
before we know what knobs we will need.
Fine with me. The add an early failure path and increase required
compression rate to 25% still worry me a bit. But I have no data to
show the first one is actually a problem. And the second one only
caused a 15% size increase for me. If that's a typical size increase
or problem, i dunno....