pgsql: Remove WalCompressionMethod in favor of pg_compress_algorithm

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove WalCompressionMethod in favor of pg_compress_algorithm
Date: 2022-04-12 08:35:08
Message-ID: E1neBzQ-0009EK-Ib@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3603f7c6e66afda7c7bf4acdefd4e5b04c5478b3

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 18 +++----
src/bin/pg_basebackup/pg_receivewal.c | 44 ++++++++--------
src/bin/pg_basebackup/receivelog.c | 2 +-
src/bin/pg_basebackup/walmethods.c | 96 +++++++++++++++++------------------
src/bin/pg_basebackup/walmethods.h | 16 ++----
5 files changed, 84 insertions(+), 92 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2022-04-12 08:54:58 pgsql: Fix grammatical errors and typos in logical replication docs.
Previous Message Alvaro Herrera 2022-04-12 07:48:11 pgsql: Change mechanism to set up source targetlist in MERGE