1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-06 07:49:08 +03:00

Support long distance matching for zstd compression

zstd compression supports a special mode for finding matched in distant
past, which may result in better compression ratio, at the expense of
using more memory (the window size is 128MB).

To enable this optional mode, use the "long" keyword when specifying the
compression method (--compress=zstd:long).

Author: Justin Pryzby
Reviewed-by: Tomas Vondra, Jacob Champion
Discussion: https://postgr.es/m/20230224191840.GD1653@telsasoft.com
Discussion: https://postgr.es/m/20220327205020.GM28503@telsasoft.com
This commit is contained in:
Tomas Vondra
2023-04-06 17:18:38 +02:00
parent 983ec23007
commit 2820adf775
12 changed files with 127 additions and 6 deletions

View File

@@ -424,8 +424,8 @@ PostgreSQL documentation
level. Otherwise, it should be a comma-separated list of items,
each of the form <literal>keyword</literal> or
<literal>keyword=value</literal>.
Currently, the supported keywords are <literal>level</literal>
and <literal>workers</literal>.
Currently, the supported keywords are <literal>level</literal>,
<literal>long</literal>, and <literal>workers</literal>.
The detail string cannot be used when the compression method
is specified as a plain integer.
</para>

View File

@@ -681,6 +681,8 @@ PostgreSQL documentation
as though it had been fed through <application>gzip</application>,
<application>lz4</application>, or <application>zstd</application>;
but the default is not to compress.
With zstd compression, <literal>long</literal> mode may improve the
compression ratio, at the cost of increased memory use.
</para>
<para>
The tar archive format currently does not support compression at all.