Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7syg-005neb-2z for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 10:39:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7syf-00Gmum-0W for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2026 10:39:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7sye-00Gmue-0T for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 10:39:13 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7syc-000000027mP-03u4 for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2026 10:39:11 +0000 Received: by mail-qt1-x841.google.com with SMTP id d75a77b69052e-50b351eaf81so58785351cf.3 for ; Wed, 01 Apr 2026 03:39:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1775039948; x=1775644748; darn=lists.postgresql.org; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=pZP/I+bt4CN2QL55SRRFxtqLfkb7/zbuzFq9fDZoCKc=; b=BSTYRu6U8FCldu/Ot4kZwVDZyTXKCIOXQyQEVWprGHwiyYJEwmKguntv4IkPkQ0W2x NIISpTj+EniwJTPK7L+dkMBdGVxRYCJp6m+0GOj6E45+NJXm69eGBRjt0M4+W73dFUam j6fnSS9bRHoBPNsfs/++68mNHYyLTknxovW2MYfEL0XdQBtLvyTUyntKPPObzZxPY0s4 nzOD6ZidcZP19rsqLNcnOmsnXwjFhAb9ZxH0tNT2171H6QLV0PEpaDk9pHzbVFcNqX9G b867LQsLEOktVofDrBPJClefnEpJ4sISS9GQMTGzvvRxVn9VmNZYIZyfCemtb06tOTIW KgSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775039948; x=1775644748; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pZP/I+bt4CN2QL55SRRFxtqLfkb7/zbuzFq9fDZoCKc=; b=buyuRNpJPOuN2Z08A59qR+zIpoHsNBX63wN+VPFthbVSc9M65GEclC+nZkGUnn2WZo 0ev92jVZDnZ2pRmbCKHAD86LjDEPYZ3ZmpBdid8hZqGkxgs4Bn08eW2FkU9wkbu02pQQ 9au1mSKK3moljlzysP0nvTAu+REOuSAJzBa4hSFIV1YNrRzFq+fPtW2TlGi+ijs4E47D lgAP6gkJJcV6qX9w9VSraKCESm0HyrBNvk3qXZYVC84ZJNAltwXUUBguTD3TlnMPt2WH pdbJUJxPCEMssEmNBF/DCWJExryXoyOL+jPyORJt9QFga09oIu8Fw0U6LZAm1EK8pCyx qQWA== X-Forwarded-Encrypted: i=1; AJvYcCW3K9dKIa5+CIbS6unrdXWL6YSRDav+0hfimRDdbhwyclGblcWvR4YTkCc3fUQ3eYckAsOicG2tWMPKyBqM@lists.postgresql.org X-Gm-Message-State: AOJu0Yw8F6YCz4eY+9/TOlEx2Ez4LnMGtQ7eBuA2QvLBEOBY4fcamTDx gWfFPr+Nci/qWo9ppkax0it5IHl4pxQGOJrpIEMLtvIIUdNQDsaSql75oy1z4U2McuU= X-Gm-Gg: ATEYQzy3ezkA6WeUrsE4uqas4shXz4YAanfsTwDCYgnChnOCnAh2Mtiur+1Bbfj5bq4 zwYc+9ptEtvxQO4M/iRVfYKGVNSjmJxqdZCsTl5FcCzTUHnaowTCSpmZZ9ynB5qBCoTnmKAcgmg 6OkI5R8s1XyoqZLyNn42UcZir66MZtOoS3jmk2kTttLIaYd6S/3oO56qhorXxGyYmgM3VFUhUYG PHUQ4+adXsBWn4zuCU34ptMYu6L462gcL86AkBEzTz1/o0aV98qN8mm2ogcg5tmhS5LYILHn5cn XyXXH6V8NzNv5I3/6yhhaf/fbtiVr9GfvDme3XZb0OjQYf5Xh2w4o/wbrVcmL92AhqCABanYjdi 7hVjvHGtXXfNLceb0qMUmCK1KyDxTfh1qMxRWo6sNmFBaNUSeSCMWWcQvXQ5whaz+s8N8FpQwDp I0uiY7ZtKu6E6gGi9ekbhOUDq1I/kbqw== X-Received: by 2002:a05:622a:149:b0:50b:3831:417f with SMTP id d75a77b69052e-50d3bce364dmr38429091cf.45.1775039948389; Wed, 01 Apr 2026 03:39:08 -0700 (PDT) Received: from ?IPV6:2605:a601:a6b0:500::1cb? ([2605:a601:a6b0:500::1cb]) by smtp.googlemail.com with ESMTPSA id d75a77b69052e-50bb2c678cfsm111925381cf.2.2026.04.01.03.39.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Apr 2026 03:39:07 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------tb0zVIB5aJ00hphI1maTkeGw" Message-ID: <7c394909-7680-4305-885e-8c7f18ed4441@dunslane.net> Date: Wed, 1 Apr 2026 06:39:05 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_waldump: support decoding of WAL inside tarfile To: Thomas Munro , Tom Lane Cc: Tomas Vondra , Andres Freund , Michael Paquier , Amul Sul , Zsolt Parragi , Robert Haas , Chao Li , Anthonin Bonnefoy , Fujii Masao , Jakub Wartak , PostgreSQL Hackers References: <2250061.1774104346@sss.pgh.pa.us> <2555285.1774131847@sss.pgh.pa.us> <2609460.1774153487@sss.pgh.pa.us> <2790913.1774200584@sss.pgh.pa.us> <2880042.1774203473@sss.pgh!!.pa.us> <3341199.1774221191@sss.pgh.pa.us> <3424809.1774234940@sss.pgh.pa.us> <1624716.1774736283@sss.pgh.pa.us> <1626907.1774737417@sss.pgh.pa.us> <97a382c0-1f19-4ea0-951f-e37e6abc34a3@vondra.me> <1630755.1774739531@sss.pgh.pa.us> <1873141.1774823011@sss.pgh.pa.us> From: Andrew Dunstan Content-Language: en-US Autocrypt: addr=andrew@dunslane.net; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNJEFuZHJldyBEdW5zdGFuIDxhbmRyZXdAZHVuc2xhbmUubmV0PsLAlwQTAQgAQQIbAwIX gAIZAQULCQgHAwUVCgkICwUWAgMBAAIeBRYhBOQ+WEYd/Hy/RGkVpZn6f8tZ/DuBBQJoGNGd BQkdEO8nAAoJEJn6f8tZ/DuBq74H/jkTR4Zi3stbw+xC7v2u3QozssK7MYPL2AsVfh7OealS h182fiWXpfvmmAB7WUHbhk9GC2RAOnHI/2d2jgKaMLAHsGYOT0YopTVIwRY43fCw/mK67yxc wmDcX+zyKfLaivNbf5A7QPLNwda98bEAMSJ8Sn652Uc6cA8t3uKGsVzbRBQOoYzjgvBCfSrE 9ql3PDNg0l4BfAqabd2f70ZUm9VAMEPrgv/v2xI7M2XiL4g5BVmqLCOwxLM8RMCotCuoweUr VO43DeBCIDwLxotMJKvGWDjBzQYlU1NPUAtNcz/gN9ITUe1VUGjyvGj4u1lxBOcQQUw7l1+T 5moZ4iZxXzvOwE0ETspYWQEIANGc4zQULOxhbqO2dyD51YhqCNRmm9oKWaqf+wmW4tpDe/VV cxAnNizd4LWCHfzpb5cHAtGkOPePMfzWVf6nvdF7d3eglbtf59+zG7O7llV0xSSoFiieQBsr GvqDInXYX/4mRRXMtyhM353/tixC9RWLs1oofyYmCPPXXY7h9R7en3B8BoVrRFcdzlIY/NFN hFGW/9dkEiGjgna2Rk6e15kln4ZvFBWUg23p93w/pqXcxY6+k/8TEk+C4R+M6w7o2PLGOjdZ +kPiUcw5H85zf/yZJwQXzisXaNduwWB6Vads9YC9dj6kPR1c4VGRqAaYL++LAEOqrlvm2Tvq QqZRtnEAEQEAAcLAfAQYAQgAJgIbDBYhBOQ+WEYd/Hy/RGkVpZn6f8tZ/DuBBQJoGNI2BQkd EODdAAoJEJn6f8tZ/DuBfw0IAKTsfD40teP/pp+bsLLMSxPXUYrrprTj7WFB5v61p6dkpSr/ qXmMlyahdxQFaPmfVgVirB1Vk/kHiWNnnGjfUV9nB2Zg9LI0Xb9/ts3LsUiRWXzG3tkMY6XL vsVOxW4XFRND9l2q+WW93aZ1DZl+fqWfYgMvsusFRhmGFOKTRfKPta2Pkv+AhA24N4+PrR5p bU4k2MO8PAGiK8eaYKGFG1bHKuAvoDoF7WXJ3FHxuWqLnKEt4dfOLm5pAe3zq1Lt6q8azT9i QWGpSAK5vQUWQHBHpiDjdPeqKZ6HiAXIIKfSmb+jrvXBqoP+D6/K7rUjG2aXiRtTIAXms9sm VRu7cmw= In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------tb0zVIB5aJ00hphI1maTkeGw Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2026-03-31 Tu 10:05 PM, Thomas Munro wrote: > On Mon, Mar 30, 2026 at 11:23 AM Tom Lane wrote: >> Thomas Munro writes: >>> Anyway, given the defaults, GNU tar + ZFS/BTRFS users must be pretty >>> unlikely to hit this in the wild, and the symptom is a confusing error >>> in a maintenance tool, not corruption, so I don't think this is a big >>> deal. I might still try teaching the astreamer code to understand PAX >>> 1.0 when it sees it in the next cycle though, for the benefit of >>> FreeBSD users. >> I agree that this isn't too critical if the effects are confined to >> pg_waldump. I believe that pg_basebackup and pg_verifybackup also use >> astreamer_tar.c, but it's not clear to me if they'd ever be asked to >> parse files made by tar(1) and not by our own sparseness-ignorant >> tar-writing code. If they can be, that'd be a higher-priority reason >> to fill in this gap. > I pushed the workaround for the test. It occurred to me this morning that we probably shouldn't run this test on Windows, and if we do we shouldn't be using /dev/null (the Windows equivalent of which is just "nul"). The simplest fix would just be to add a "!$windows_os" to the if test. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------tb0zVIB5aJ00hphI1maTkeGw Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2026-03-31 Tu 10:05 PM, Thomas Munro wrote:
On Mon, Mar 30, 2026 at 11:23 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Thomas Munro <thomas.munro@gmail.com> writes:
Anyway, given the defaults, GNU tar + ZFS/BTRFS users must be pretty
unlikely to hit this in the wild, and the symptom is a confusing error
in a maintenance tool, not corruption, so I don't think this is a big
deal.  I might still try teaching the astreamer code to understand PAX
1.0 when it sees it in the next cycle though, for the benefit of
FreeBSD users.
I agree that this isn't too critical if the effects are confined to
pg_waldump.  I believe that pg_basebackup and pg_verifybackup also use
astreamer_tar.c, but it's not clear to me if they'd ever be asked to
parse files made by tar(1) and not by our own sparseness-ignorant
tar-writing code.  If they can be, that'd be a higher-priority reason
to fill in this gap.
I pushed the workaround for the test.


It occurred to me this morning that we probably shouldn't run this test on Windows, and if we do we shouldn't be using /dev/null (the Windows equivalent of which is just "nul"). The simplest fix would just be to add a "!$windows_os" to the if test.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------tb0zVIB5aJ00hphI1maTkeGw--