From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Clean up some dead code in pg_dump with tar format and gzip comp |
Date: | 2022-03-31 01:36:30 |
Message-ID: | E1nZjjh-00053e-V4@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Clean up some dead code in pg_dump with tar format and gzip compression
Compression with gzip has never been supported in the tar format of
pg_dump since this code has been introduced in c3e18804, as the use of
buffered I/O in gzdopen() changes the file positioning that tar
requires. The original idea behind the use of compression with the tar
mode is to be able to include compressed data files (named %u.dat.gz)
and blob files (blob_%u.dat.gz) in the tarball generated by the dump,
with toc.dat, that tracks down if compression is used in the dump,
always uncompressed.
Note that this commit removes the dump part of the code as well as the
restore part, removing any dependency to zlib in pg_backup_tar.c. There
could be an argument behind keeping around the restore part, but this
would require one to change the internals of a tarball previously dumped
so as data and blob files are compressed with toc.dat itself changed to
track down if compression is enabled. However, the argument about
gzdopen() still holds in the read case with pg_restore.
Removing this code simplifies future additions related to compression in
pg_dump.
Author: Georgios Kokolatos, Rachel Heaton
Discussion: https://postgr.es/m/faUNEOpts9vunEaLnmxmG-DldLSg_ql137OC3JYDmgrOMHm1RvvWY2IdBkv_CRxm5spCCb_OmKNk2T03TMm0fBEWveFF9wA1WizPuAgB7Ss=@protonmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8ac4c25a05d1e491a51d5390aaae405600e8e466
Modified Files
--------------
src/bin/pg_dump/pg_backup_tar.c | 89 +++++------------------------------------
1 file changed, 11 insertions(+), 78 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2022-03-31 01:37:27 | Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches |
Previous Message | Tom Lane | 2022-03-31 01:12:20 | Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches |