Remove WalCompressionMethod in favor of pg_compress_algorithm
authorMichael Paquier <michael@paquier.xyz>
Tue, 12 Apr 2022 08:28:17 +0000 (17:28 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 12 Apr 2022 08:28:17 +0000 (17:28 +0900)
commit3603f7c6e66afda7c7bf4acdefd4e5b04c5478b3
tree44cfb27d358f8a39842280644b14e910a3fb98bf
parentce4f46fdc814eb1b704d81640f6d8f03625d0f53
Remove WalCompressionMethod in favor of pg_compress_algorithm

The same structure, with the same set of elements (for none, lz4, gzip
and zstd), exists in compression.h, so let's make use of the centralized
version instead of duplicating things.  Some of the variables used
previously for WalCompressionMethod are renamed to stick better with the
new structure and routine names.

WalCompressionMethod was leading to some confusion in walmethods.c, as
it was sometimes used to refer to some data unrelated to WAL.

Reported-by: Robert Haas
Author: Michael Paquier
Reviewed-by: Robert Haas, Georgios Kokolatos
Discussion: https://postgr.es/m/YlPQGNAAa04raObK@paquier.xyz
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_receivewal.c
src/bin/pg_basebackup/receivelog.c
src/bin/pg_basebackup/walmethods.c
src/bin/pg_basebackup/walmethods.h