Re: pg_waldump: support decoding of WAL inside tarfile

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(at)vondra(dot)me>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Amul Sul <sulamul(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_waldump: support decoding of WAL inside tarfile
Date: 2026-03-28 23:34:35
Message-ID: 1633233.1774740875@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Sun, Mar 29, 2026 at 11:37 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> It looks like to make this test stable on modern FreeBSD,
>> we need to see if tar accepts --no-read-sparse and use that
>> switch if so.

> Yeah. Here's my attempt at perl.

Andrew might have some stylistic suggestions, but this looks
plausible to me.

> I think your Mac probably has a similar tar program BTW... but apfs
> probably doesn't go around making holes visible to lseek()
> automatically or at least as eagerly as my ZFS system.

Interesting ... on my Tahoe laptop, I see

$ tar --version
bsdtar 3.5.3 - libarchive 3.7.4 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8

There is nothing in "tar --help" about sparse files, but
experimentation shows that it accepts --[no-]read-sparse.
Can't easily tell if the switch actually does anything.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Junwang Zhao 2026-03-29 01:40:22 Re: SQL Property Graph Queries (SQL/PGQ)
Previous Message Thomas Munro 2026-03-28 23:15:39 Re: pg_waldump: support decoding of WAL inside tarfile