Rename backup_compression.{c,h} to compression.{c,h}
authorMichael Paquier <michael@paquier.xyz>
Tue, 12 Apr 2022 04:38:54 +0000 (13:38 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 12 Apr 2022 04:38:54 +0000 (13:38 +0900)
commita4b57543acfb52cc7c7e031501002563f536b929
treea24d3a2c95880f547500a8bcdbe94d718d005eca
parentbd037dc928dd126e5623117b2fe7633ec3fa7c40
Rename backup_compression.{c,h} to compression.{c,h}

Compression option handling (level, algorithm or even workers) can be
used across several parts of the system and not only base backups.
Structures, objects and routines are renamed in consequence, to remove
the concept of base backups from this part of the code making this
change straight-forward.

pg_receivewal, that has gained support for LZ4 since babbbb5, will make
use of this infrastructure for its set of compression options, bringing
more consistency with pg_basebackup.  This cleanup needs to be done
before releasing a beta of 15.  pg_dump is a potential future target, as
well, and adding more compression options to it may happen in 16~.

Author: Michael Paquier
Reviewed-by: Robert Haas, Georgios Kokolatos
Discussion: https://postgr.es/m/YlPQGNAAa04raObK@paquier.xyz
17 files changed:
src/backend/replication/basebackup.c
src/backend/replication/basebackup_gzip.c
src/backend/replication/basebackup_lz4.c
src/backend/replication/basebackup_zstd.c
src/bin/pg_basebackup/bbstreamer.h
src/bin/pg_basebackup/bbstreamer_gzip.c
src/bin/pg_basebackup/bbstreamer_lz4.c
src/bin/pg_basebackup/bbstreamer_zstd.c
src/bin/pg_basebackup/nls.mk
src/bin/pg_basebackup/pg_basebackup.c
src/common/Makefile
src/common/compression.c [moved from src/common/backup_compression.c with 80% similarity]
src/include/common/backup_compression.h [deleted file]
src/include/common/compression.h [new file with mode: 0644]
src/include/replication/basebackup_sink.h
src/tools/msvc/Mkvcbuild.pm
src/tools/pgindent/typedefs.list