pgsql: Move tar detection and compression logic to common.
pgsql: Move tar detection and compression logic to common.
От:
Andrew Dunstan <andrew@dunslane.net>
Дата:
Move tar detection and compression logic to common. Consolidate tar archive identification and compression-type detection logic into a shared location. Currently used by pg_basebackup and pg_verifybackup, this functionality is also required for upcoming pg_waldump enhancements. This change promotes code reuse and simplifies maintenance across frontend tools. Author: Amul Sul Reviewed-by: Robert Haas Reviewed-by: Jakub Wartak Reviewed-by: Chao Li Reviewed-by: Euler Taveira Reviewed-by: Andrew Dunstan Reviewed-by: Zsolt Parragi discussion: https://postgr.es/m/CAAJ_b94bqdWN3h2J-PzzzQ2Npbwct5ZQHggn_QoYGhC2rn-=WQ@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c8a350a439826267186c187dbfbf1f839f7521aa Modified Files -------------- src/bin/pg_basebackup/pg_basebackup.c | 36 ++++++++++--------------------- src/bin/pg_verifybackup/pg_verifybackup.c | 12 +---------- src/common/compression.c | 30 ++++++++++++++++++++++++++ src/include/common/compression.h | 2 ++ 4 files changed, 44 insertions(+), 36 deletions(-)