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 1w6byy-004TIC-2B for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Mar 2026 22:18:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w6byx-00FFJp-0B for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Mar 2026 22:18:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w6byw-00FFJg-2J for pgsql-hackers@lists.postgresql.org; Sat, 28 Mar 2026 22:18:15 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w6byu-00000001ijQ-2CKT for pgsql-hackers@lists.postgresql.org; Sat, 28 Mar 2026 22:18:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 62SMI3cl1624717; Sat, 28 Mar 2026 18:18:03 -0400 From: Tom Lane To: Thomas Munro cc: Andres Freund , Michael Paquier , Andrew Dunstan , Amul Sul , Zsolt Parragi , Robert Haas , Chao Li , Anthonin Bonnefoy , Fujii Masao , Jakub Wartak , PostgreSQL Hackers Subject: Re: pg_waldump: support decoding of WAL inside tarfile In-reply-to: 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> Comments: In-reply-to Thomas Munro message dated "Sun, 29 Mar 2026 10:36:06 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1624715.1774736283.1@sss.pgh.pa.us> Date: Sat, 28 Mar 2026 18:18:03 -0400 Message-ID: <1624716.1774736283@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > It seems like the place we'd be looking for the file is in > astreamer_tar_header(), so I added in some caveman debugging: > XXXX [PaxHeader/000000010000000000000002] XXXX > XXXX [GNUSparseFile.0/000000010000000000000002] XXXX After a bit of research, I see the problem: your tar has decided to store 000000010000000000000002 as a sparse file, and evidently it inserts "GNUSparseFile.0/" into the file name when it does that. Our tar-parsing logic will not recognize that name as being one of the WAL files it wants; and even if it did, it doesn't know how to de-sparse the file contents, so it would get the wrong output. I'm pretty disinclined to try to support sparse files here, especially with ~10 days till feature freeze. However ... I do not find any indication in the GNU tar docs that it produces sparse files by default. It looks like you need to say -S/--sparse to make that happen. Maybe you have a version that's been hacked to make that the default? regards, tom lane