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 1w8Shm-000Ycg-0S for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 00:48:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w8Shk-00956P-2l for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Apr 2026 00:48:09 +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 1w8Shk-00956H-1p for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 00:48:08 +0000 Received: from mail-dy1-x1329.google.com ([2607:f8b0:4864:20::1329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w8Shi-00000000I8f-2pKH for pgsql-hackers@lists.postgresql.org; Fri, 03 Apr 2026 00:48:08 +0000 Received: by mail-dy1-x1329.google.com with SMTP id 5a478bee46e88-2cc175eec4dso17118eec.1 for ; Thu, 02 Apr 2026 17:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1775177285; cv=none; d=google.com; s=arc-20240605; b=Nt8WZu7gyRMaeVzfLqPkQ6OaP58oy6PGo+dLv3oTTXuAE1jzguxaoFToA8dUaERjwT urPrsGqorV/6p2fFvDwlRE2Ho/SmD4urpgGfL3byDFykQU/BDUrf8Kt4ULJ+CWd+eDMS 7uTvrhE/seAl7EkSXuE6JrYawcnsPmo6Dyh2UlPmvvCkPzuSQo7L4bkfJ2XB3J20g7uk WSoQaM35DBtyT7pOUn4jjh/4DiE8xeTMRfG2r5TkTShG0ZhwqSDyZU4vcbVyIBONhEc4 0CKkP6dF7uHvFKfJiQ55MvYuYbyPqzJMFstXFpvF8wqvU7RGufd9UG5RrArptcArbUMZ pYJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=J64O8UoekuJFXVrN1vMtkMwY5PIw9JSsPDRXFMeXCEk=; fh=IGiWbmSiChPOK/6846HUTI7okxia87SECuCjEU04lzw=; b=aArEnoiTjZmq6lxZRoQIUhyOvAJrmksnST5SEwvDITTbEiTmJQSJ/E2zj/PCHpX3CR oSkJ06hBokUGDAOq255US2E+66rPPgywJBuvDQ+hrkuQYMfP9pQFN8yecSh9XknCKBRU VqwNSyL5GaCcDK/U+D7TbZrkG0GiDYmiLebZNjSncelVYT7CB0T+8boFbqnVSYoAmAy6 pTHd0Uwg/6B6TPjb3XsCVSPEAOm7XJmAMyVc1J9eMwEMwg7J4Z6ZLW9S3TTwtmnsf/w2 7GDW1MY1TmKg145hGD2Mpi+2fGmI7jQVvTi7/ruz91taVscL4ghg5pU/SiNFEw1Z9qDm jw1w==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775177285; x=1775782085; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=J64O8UoekuJFXVrN1vMtkMwY5PIw9JSsPDRXFMeXCEk=; b=O6sp2RngpxuyBHMe8z4piotcbO6xaWxrFUZKdEyUBaGbQV1iwrCp0rQQOrElnOPm88 Q2aUbB9MXDrdo081hya1VB9xoeF90rHsVz/orj0aozh0L9V9dExMNYdrN6Z02gstjbBj lKOI/haCLAJxQmR15AsJ2d94I9AwzDXQetZWmFb0acZBWnFyU01u//ZnVimoDZj6So68 aXqVOCfowcm5xojjYikFrXQGk4zv3BzX7MFnG4W9CW5OlEMV5cE/C90HrSGshwjLKn6f bThzVgxB9zNfx2F6x1aShuCtYlD8BnEbIoDyhd9ZQso0sMyDxuRVd/pVvhUBOxmIk456 YpnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775177285; x=1775782085; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=J64O8UoekuJFXVrN1vMtkMwY5PIw9JSsPDRXFMeXCEk=; b=BzsYtgtH9fyIlIiYF1TYcoB0fLUuwjQarpUhhKHpTyyd6S7rngn3X8CfV/LgM2aP07 PTdUeGxOPRUeaZV3oPfM7mjc7yem7UBLl4GQThwYWAkLiAUVrUeRUsr6jntfQJ8gas2l 0nzRIxm3b2/HMTKVcRPtvcEDzePseVHJyVTNjF4tdaxt8Z1NbhJJp8Epu0SXVp+cpZo2 lwIt4j6iKiHQI1thUeoTxM7wV7XfrWs/2pvehym5LKqFjQB1Cn6lz3LW/cid/knjKQGb i7kKlpItywI5xn+d2GMl+/7mLfwN5EODbFQi8R68CcBKOlH+odWeV94lZOZ9M8B7a4Ol M58Q== X-Forwarded-Encrypted: i=1; AJvYcCUATtRQEvS8a6eQ5OFePMokdkGSRhzDYXtZuvGVcNX9EbDpAxSo5ESesJwF0Rxq3PAExhL/w3F1/2P3fZK/@lists.postgresql.org X-Gm-Message-State: AOJu0YzqRXtCm4UN5HtWOzCvpuKFa16aaqY6dXXyAR8F0uOaaKq4wGAv JR1Yaawa7drnw6KAMpHjf0d4eYWYEn+TChbneNPPfod0cNwpcaPSJ5+tM/FOb5Qe3zuE4uf+I4y w1eCuvEGM3wCaJs7eRA5h3H0tRiFCdj4= X-Gm-Gg: AeBDieuCEL3AsYvUaGmsyJ+TbU7EuPJ/7krU/xf6S0JFgVVQMEAHGd5i1ogsZ2mVF2Y FHTG/sQSr42WUS94Fd0xCcA1Cvvfm6AD4QJbpfsSINq5OFBG60B9c2j8X8KCMVDF6kUIdE56gbY hfP/9jltoqJhg3NXz2QDFsTyby6qvW2Agcv1QCXGlFWvl83Mkfvvj3GQHMYUq3Tf6d5GvxQOyFe R8/0JEIu6RJt8miY1eNNIajTMPWDBwNiiaChdriABupPvH3ZiELCZJ8bqen16b+eLk8leiM4Ph5 KBJqolG8Oh8UWO8NKTVhv/0dllKoACImxP4RebLPWDkrat0yW6QUsT0Dcein9xZ9HNijNy0AXyU = X-Received: by 2002:a05:7300:a484:b0:2c4:ec89:bd7 with SMTP id 5a478bee46e88-2cbfc16e3ecmr217377eec.5.1775177285181; Thu, 02 Apr 2026 17:48:05 -0700 (PDT) MIME-Version: 1.0 References: <2250061.1774104346@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> <3049460.1775067940@sss.pgh.pa.us> <3118179.1775092964@sss.pgh.pa.us> <3565835.1775147392@sss.pgh.pa.us> <3579709.1775151816@sss.pgh.pa.us> <63de1553-829a-488d-8ee0-976afb8dd32c@vondra.me> <3586483.1775155672@sss.pgh.pa.us> <3676229.1775170250@sss.pgh.pa.us> <3686764.1775175097@sss.pgh.pa.us> In-Reply-To: <3686764.1775175097@sss.pgh.pa.us> From: Thomas Munro Date: Fri, 3 Apr 2026 13:47:28 +1300 X-Gm-Features: AQROBzDgEj1CRI2OiNi5NOsz1UUOgp48_56J_HYjSCNmMPgZLzX_VKpyxfs_LZE Message-ID: Subject: Re: pg_waldump: support decoding of WAL inside tarfile To: Tom Lane Cc: Tomas Vondra , Andres Freund , Michael Paquier , Andrew Dunstan , Amul Sul , Zsolt Parragi , Robert Haas , Chao Li , Anthonin Bonnefoy , Fujii Masao , Jakub Wartak , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 3, 2026 at 1:11=E2=80=AFPM Tom Lane wrote: > In any case, this is all completely moot if we don't write code to > de-sparse a sparse entry: we will not be able to validate WAL data > if the WAL file is missing some pages. So I see little point in > having code that tolerates pax headers if it doesn't also do that. Yeah. FWIW I spent a few hours hacking on that the other day and could decode many files, but I now realise that the task was made more difficult by a problem you fixed: without header validation, small mistakes resulted in corruption or went bananas. With that now addressed, I hope I can get it into shape and propose it for the next cycle... For what it's worth, I was just speculating about how one might reasonably handle unrecognised *non-standard* header names, not the POSIX-standardised ones which, you're right, we'd probably need to grok properly. If we assumed reasonable engineering decisions following (what I understood to be) the spirit of pax, maybe we could assume that new non-standard headers either don't affect file contents and thus could be ignored (think: GNU.windows.permissions=3D...), or do affect file contents but have measures in place to prevent unknown encodings from being exposed to unsuspecting software (think: deathstation.byte=3D9bit). That's a position we could choose to take, anyway, in the absence of a crystal ball... Fortunately there aren't really many implementations of POSIX left, so it's not like we're dealing with the Fermi Paradox here...