RFC/WIP: adding new configuration options to TOAST
От | Bill Moran |
---|---|
Тема | RFC/WIP: adding new configuration options to TOAST |
Дата | |
Msg-id | 20151103100431.1e9ea80e39b807d7d1f47fc6@potentialtech.com обсуждение исходный текст |
Ответы |
Re: RFC/WIP: adding new configuration options to TOAST
|
Список | pgsql-hackers |
Looking for feedback to see if anyone sees any issues or has any suggestions on what I'm doing. The attached patch alters 3 things with regard to TOAST behavior: 1) Add a GUC target_compression_ratio: When attempting to compress a datum in the TOAST code, only stored the compressed version if it saves at least target_compression_ratio% space. 2) Add a constant COMPRESSION_TEST_SIZE: If a datum is larger than this size, initially COMPRESSION_TEST_SIZE bytes are compressed, and the entire datum is only compressed if the test compression indicates that it might be worth it. The goal is to avoid the CPU of compressing a large value that isn't going to save space anyway. 3) Add a GUC target_tuple_size: which exposes the "fit at least 4 tuples on a page" logic as a configurable value. The value is exposed as a maximum desired size (instead of the target tuples to fit on a page) because that seems like a more intuitive configuration option to me. If this seems to be on track, then my next step is to make these values configurable on a per-table basis. I'm tracking my work on github, if that's easier to review than the patch for anyone: https://github.com/williammoran/postgres -- Bill Moran
Вложения
В списке pgsql-hackers по дате отправления: