Dear Hackers. For the current PostgreSQL, the toast data and some WAL data (page data) are compressed using the LZ-based algorithm. For PostgreSQL, two types of strategy(PGLZ_strategy_default, PGLZ_strategy_always) are provided by default, and only used of PGLZ_strategy_default(default values) on PostgreSQL core.
For PGLZ_strategy_default values: 1. reduce the size of compressed data by 25% or more 2. original data between 32 bytes and INT_MAX bytes 3. When the first 1 kb data is compressed (addition to the dictionary and reused) PGLZ Compression will only succeed if these conditions are met. However, some users may want to be compressed, requiring a slightly more loose condition. So how about things modify a flexible strategy that is not a fixed setting to compression strategy, to allow the user to set it? Perhaps the configurable value is min_input_size min_comp_rate first_supcess_by I want to add this to GUC so that is can set the minimum compressible file size and compression rate. The compression-related strategy is applied only when compressed. Decompression does not use strategy, so the old compressed data is not affected by the new patch. What do you think of this proposal? If there are any agree to this proposal, I want to write patches.