pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Introduce a generic pg_dump compression API
Date: Thu, 23 Feb 2023 17:34:25 +0000
Message-ID: <E1pVFU8-000L02-RZ@gemulon.postgresql.org> (raw)

Introduce a generic pg_dump compression API

Switch pg_dump to use the Compression API, implemented by bf9aa490db.

The CompressFileHandle replaces the cfp* family of functions with a
struct of callbacks for accessing (compressed) files. This allows adding
new compression methods simply by introducing a new struct instance with
appropriate implementation of the callbacks.

Archives compressed using custom compression methods store an identifier
of the compression algorithm in their header instead of the compression
level. The header version is bumped.

Author: Georgios Kokolatos
Reviewed-by: Michael Paquier, Rachel Heaton, Justin Pryzby, Tomas Vondra
Discussion: https://postgr.es/m/faUNEOpts9vunEaLnmxmG-DldLSg_ql137OC3JYDmgrOMHm1RvvWY2IdBkv_CRxm5spCCb_OmKNk2T03...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e9960732a9618d5f744ff43a09622c9185798760

Modified Files
--------------
src/bin/pg_dump/Makefile              |   2 +
src/bin/pg_dump/compress_gzip.c       | 401 ++++++++++++++++++
src/bin/pg_dump/compress_gzip.h       |  24 ++
src/bin/pg_dump/compress_io.c         | 741 ++++++----------------------------
src/bin/pg_dump/compress_io.h         | 166 ++++++--
src/bin/pg_dump/compress_none.c       | 206 ++++++++++
src/bin/pg_dump/compress_none.h       |  24 ++
src/bin/pg_dump/meson.build           |   2 +
src/bin/pg_dump/pg_backup_archiver.c  |  91 +++--
src/bin/pg_dump/pg_backup_archiver.h  |   5 +-
src/bin/pg_dump/pg_backup_custom.c    |  27 +-
src/bin/pg_dump/pg_backup_directory.c |  94 ++---
src/bin/pg_dump/t/002_pg_dump.pl      |  10 +-
src/include/common/compression.h      |   4 +
src/tools/pginclude/cpluspluscheck    |   2 +
src/tools/pgindent/typedefs.list      |   2 +
16 files changed, 1050 insertions(+), 751 deletions(-)



Message-ID: <E1pVFU8-000L02-RZ@gemulon.postgresql.org>
Permalink:  ../E1pVFU8-000L02-RZ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pVFU8-000L02-RZ@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tomas.vondra@postgresql.org
  Subject: Re: pgsql: Introduce a generic pg_dump compression API
  In-Reply-To: <E1pVFU8-000L02-RZ@gemulon.postgresql.org>
  References: <E1pVFU8-000L02-RZ@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox