Prepare pg_dump internals for additional compression methods
Tomas Vondra <tomas.vondra@postgresql.org>
Prepare pg_dump internals for additional compression methods
Commit bf9aa490db introduced a compression API in compress_io.{c,h} to
make reuse easier, and allow adding more compression algorithms.
However, pg_backup_archiver.c was not switched to this API and continued
to call the compression directly.
This commit teaches pg_backup_archiver.c about the compression API, so
that it can benefit from bf9aa490db (simpler code, easier addition of
new compression methods).
Author: Georgios Kokolatos
Reviewed-by: Michael Paquier, Rachel Heaton, Justin Pryzby, Tomas Vondra
Discussion: https://postgr.es/m/faUNEOpts9vunEaLnmxmG-DldLSg_ql137OC3JYDmgrOMHm1RvvWY2IdBkv_CRxm5spCCb_OmKNk2T03TMm0fBEWveFF9wA1WizPuAgB7Ss%3D%40protonmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_dump/compress_io.c | modified | +84 −13 |
| src/bin/pg_dump/compress_io.h | modified | +4 −0 |
| src/bin/pg_dump/pg_backup_archiver.c | modified | +49 −89 |
| src/bin/pg_dump/pg_backup_archiver.h | modified | +1 −26 |
Discussion
- Add LZ4 compression in pg_dump 205 messages · 2022-02-25 → 2025-10-14