summaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorTomas Vondra <tomas.vondra@postgresql.org>2023-04-01 00:54:17 +0200
committerTomas Vondra <tomas.vondra@postgresql.org>2023-04-01 00:54:50 +0200
commit0070b66fef21e909adb283f7faa7b1978836ad75 (patch)
tree2cb4f20596c4775eed79c1e4d71d3551d90b115c /src/backend/access/gist/gistbuild.c
parentc8f8d0eb1868cc88d481518d2b6aa0767116055c (diff)
downloadpostgresql-0070b66fef21e909adb283f7faa7b1978836ad75.tar.gz
pg_dump: Use only LZ4 frame format for compression
After 0da243fed0 got committed, it was reported that in some cases the compression ratio is rather poor - particularly for custom format with narrow tables - due to writing the LZ4 header/footer for each row. This commit switches to LZ4F (LZ4 frame format), eliminating most of the overhead and greatly improving the compression ratio. This makes the compressed size about the same for plain and custom formats (just like for gzip, for example). LZ4F is now used by both compression APIs, which allowed refactoring and reusing more of the code. For consistency this also renames the LZ4File struct to LZ4State, and a number of functions are now prefixed with LZ4Stream_ (instead of LZ4File_). Patch by Georgios Kokolatos, based on report and initial patch by Justin Pryzby. Review and minor cleanups by me. Author: Georgios Kokolatos, Justin Pryzby Reported-by: Justin Pryzby Reviewed-by: Tomas Vondra Discussion: https://postgr.es/m/20230227044910.GO1653%40telsasoft.com
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions