pgsql: Clean up some dead code in pg_dump with tar format and gzip comp

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Clean up some dead code in pg_dump with tar format and gzip comp
Дата
Msg-id E1nZjjh-00053e-V4@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: pgsql: Make PostgreSQL::Test::Cluster compatible with all live branches