Re: pgsql: Move tar detection and compression logic to common.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, amul sul <sulamul(at)gmail(dot)com>
Subject: Re: pgsql: Move tar detection and compression logic to common.
Date: 2026-07-22 19:28:02
Message-ID: CAD5tBcJS9yUMRLF5ZROxByvd5hwj76agm63NntKV=Be64rybHw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Jul 22, 2026 at 12:23 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Fri, Mar 20, 2026 at 3:32 PM Andrew Dunstan <andrew(at)dunslane(dot)net>
> wrote:
> > 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.
> >
> >
> https://git.postgresql.org/pg/commitdiff/c8a350a439826267186c187dbfbf1f839f7521aa
>
> Unfortunately, this commit not only consolidated the logic but also
> changed the behavior at both of the then-existing call sites for the
> worse.
>
> I attach a patch to undo those behavior changes, which I intend to
> commit and back-patch to v19.
>
>

Thanks, Robert. The change in precheck_tar_backup could possibly do with a
comment like "Make sure there's nothing between the expected prefix and
suffix". I had to look hard to see what it was doing.

cheers

andrew

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2026-07-22 19:55:32 Re: pgsql: Move tar detection and compression logic to common.
Previous Message Robert Haas 2026-07-22 16:23:02 Re: pgsql: Move tar detection and compression logic to common.

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2026-07-22 19:28:53 Re: Restore vacuum_delay_point() in GIN posting-tree leaf vacuum
Previous Message Masahiko Sawada 2026-07-22 19:16:10 Re: Follow-up fixes for online wal_level change