Add LZ4 compression to pg_dump
Tomas Vondra <tomas.vondra@postgresql.org>
Add LZ4 compression to pg_dump
Expand pg_dump's compression streaming and file APIs to support the lz4
algorithm. The newly added compress_lz4.{c,h} files cover all the
functionality of the aforementioned APIs. Minor changes were necessary
in various pg_backup_* files, where code for the 'lz4' file suffix has
been added, as well as pg_dump's compression option parsing.
Author: Georgios Kokolatos
Reviewed-by: Michael Paquier, Rachel Heaton, Justin Pryzby, Shi Yu, Tomas Vondra
Discussion: https://postgr.es/m/faUNEOpts9vunEaLnmxmG-DldLSg_ql137OC3JYDmgrOMHm1RvvWY2IdBkv_CRxm5spCCb_OmKNk2T03TMm0fBEWveFF9wA1WizPuAgB7Ss%3D%40protonmail.com
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/pg_dump.sgml | modified | +7 −6 |
| src/bin/pg_dump/compress_io.c | modified | +23 −3 |
| src/bin/pg_dump/compress_lz4.c | added | +626 −0 |
| src/bin/pg_dump/compress_lz4.h | added | +24 −0 |
| src/bin/pg_dump/Makefile | modified | +2 −0 |
| src/bin/pg_dump/meson.build | modified | +6 −2 |
| src/bin/pg_dump/pg_backup_archiver.c | modified | +5 −1 |
| src/bin/pg_dump/pg_backup_directory.c | modified | +6 −3 |
| src/bin/pg_dump/pg_dump.c | modified | +2 −3 |
| src/bin/pg_dump/t/002_pg_dump.pl | modified | +78 −4 |
| src/tools/pginclude/cpluspluscheck | modified | +1 −0 |
| src/tools/pgindent/typedefs.list | modified | +2 −0 |
Documentation touched
Discussion
- Add LZ4 compression in pg_dump 205 messages · 2022-02-25 → 2025-10-14