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 1w4QCl-002BAE-1h for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Mar 2026 21:19:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w4QCj-00EErG-2b for pgsql-hackers@arkaria.postgresql.org; Sun, 22 Mar 2026 21:19:26 +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 1w4QCj-00EEr7-0u for pgsql-hackers@lists.postgresql.org; Sun, 22 Mar 2026 21:19:25 +0000 Received: from mail-yw1-x1129.google.com ([2607:f8b0:4864:20::1129]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w4QCg-00000000WJw-3pga for pgsql-hackers@lists.postgresql.org; Sun, 22 Mar 2026 21:19:24 +0000 Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-7982c3b7dfcso31856897b3.0 for ; Sun, 22 Mar 2026 14:19:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774214360; cv=none; d=google.com; s=arc-20240605; b=PwTHrDhFsxIMuoiLbwvRcMMfhEBG13ylYSWJEYhuQOEnEp800sW6ZCDeEWwl/SsTsA CMwCqx9DwdxzOjRShSj+8umdn8z+hSkzSl18dwMZjAJsH76UaZX3CO1NA/bDBLTHcHjB bfVjMKgcg+LNeGKtawmgaR9L8W9SoHzSbep82OQp3kJEw2Sx1Nf1VESSfhKBmdF0Dy1o YTso/VdgpRmwKnOkZZqi2ZCNXWZ6OFTCwvvt12pJ+0CUsomQ+BNeaodbkpoag7RaOMOB Kiv61J9AlYgFn+U9D3Co5VPxQvkNAAetuJW5Caj+KVrxBFfa7dy088nldYZBROPM/FZd +ZsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=/U6QjBv8SYWQb2cjLCVxC+e1Q0sRHU0JN5lFvXwKY1U=; fh=ze/AnQLDj5C8GIS+rJjkStxaqyzxHFsjQEvqoJAjmU4=; b=RWY57VTDQO0efV7hGPAI/NVrSf6iCXS6ysn/jAG0maMJ8wTox8wDdrQchpcdFQ/xWh 4SZBASyiOYybwF4ypoHZCe9i/Si/g9K8Yisimk0TUEDMnkJ+YPlzBqK9TpCfrAbLc+/U Kk0yT3KYvjwuJRBrZgftdwto8bxbXdyb1iR0MsWzA91Kepq0Eo4zF5rr3sB3X+9F+RXM DixTSpYU9IimzYrDVBQzm9959rvRYaGMMhddCm9SMsV5cLcJNmu5iTXwgJaMABlvOujJ nCXXagdxCdpdFrWpFquKxhXGEc683rjD9m4uXuCXeOW+D5bIXnSmqe208QaFmHg79Ep9 3OcA==; 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=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1774214360; x=1774819160; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/U6QjBv8SYWQb2cjLCVxC+e1Q0sRHU0JN5lFvXwKY1U=; b=maKWhTiMtRZjsSvBtuqvD9tvhdXPF1oHKH+mimfrflIjn7KwSWaiLQD9tDP5HDaWpv mdHqUm3ic7GNxnsKX8fxqs65Mil2CYQJSyQV8Z9sSILWdXVKWzLLu2JceAJhOOQr7rlj 8rzFrg8BDpTzUzRpvHOQmacQbhOwHCMXia42+lgTazxrJ6wLUCg3a9FBxF3fUVF/Uj58 zBuXuWA1LL+N3zEjl0wk0sFYcwnQJhkYkUt+vZ1zqAwxdT1Kc9S3pRA+lGGMaGIjUEnb VVtDW9pMn8WF/1Y/tECSikrZSMaWAI4xurx+UekmbbuR/XYiW2dP3Qj/7BkZxMZwpqMi tjMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774214360; x=1774819160; h=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=/U6QjBv8SYWQb2cjLCVxC+e1Q0sRHU0JN5lFvXwKY1U=; b=nlOU5CTQEcxYLejTYXO4pQQ8AlK/jNmZg2MbPAIjiXdsGC8vzitHbkD1WMpiuvTzaG ge7ltzYcGn/eigRkVzeEdjtaIB8ADP8zkMXLAACQ2pqLuXwHFbY02eTKqwbQb/qzHqP8 dKBCus5S8GP82uosOYrVgHGidFLjdO7V9dfnvfvTDzSDwfYNVSzBcyyBL8TLLqzgfZNe 0ZRe5aDnQqAzGDdtLu+PHZksaeB0hOCTv7q0kRm5rPiVDsOtBnnSx1DMfPBhfK1sKhcL QeE2JHdyKSikQmQ6Czrie354ykB1nedZL1qXo9eJ5rxl45+BWEdFXJ2Zkvw/2h+Tiv1K itjQ== X-Forwarded-Encrypted: i=1; AJvYcCVyUILjeB0sFBlMFv9LExJfc/XV/7kz1Yae0qURAVB4dzBUzzxjavsdFbNuU1fCr+hFD7BYTnUzUtMZmSHd@lists.postgresql.org X-Gm-Message-State: AOJu0YxIB5P2j67stVqi8dLt4blhWXuXBmQXl5cgNOvc/aQU/GxmVpr/ 4KKcYzzRIFkUvxKXX0Zgw1OMCIUK2urdLagKRfUpdBZPcwrgavYbF2nOVIwZCFKgw9m/CyxcJ59 suGR1Qwib2wNNdXdHMwEG/Q8Q3LnfgmMRdQ2XB+vUqA== X-Gm-Gg: ATEYQzy8CkrTeZQ31ZnPPB9/0kx+c09EZj3RR/t42DrMWep7I29Gk08jV0e08z7gk0M WdDOc4cGIhYPli7YCFyt0wosuSXBZbdTjVaRwUSsbuJiDUBVqvTQO3tuDsJ/6X4XKc+ylbHx2Gl +ZVlZo0LfbHkinXgt9jm2Xy6II4p5XuTDybvj+P5ktsgHF8xgX1IpqDJX+FN5j1k1bpxKnFmvK+ E3eioxgtJ3aFys+MRJ0yvIlknRp0C3AteKi4fIiwFeJu/X+HK/sghsemM8tl8WTAj/HD16nYWwu BlxEwGTh X-Received: by 2002:a05:690c:f06:b0:79a:b330:a8c5 with SMTP id 00721157ae682-79ab330ac54mr21479237b3.38.1774214360328; Sun, 22 Mar 2026 14:19:20 -0700 (PDT) MIME-Version: 1.0 References: <401bf08a-c8f1-48e2-9a30-78deaa9fa7c5@dunslane.net> <9a2be101-!42c9-40dd-9860-aa12f06bf0e0@dunslane.net> <2178517.1774064942@sss.pgh.pa.us> <2197317.1774074840@sss.pgh.pa.us> <1663e08f-2711-42ed-a3c7-08632c852911@dunslane.net> <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> In-Reply-To: <2880042.1774203473@sss.pgh.pa.us> From: Andrew Dunstan Date: Sun, 22 Mar 2026 17:19:09 -0400 X-Gm-Features: AaiRm524_YdbVUJOCcAjcPjb8tgur9YFG5ASFpC8jYn1Em84_n_Xq04j5p1NKtA Message-ID: Subject: Re: pg_waldump: support decoding of WAL inside tarfile To: Tom Lane Cc: Michael Paquier , Amul Sul , Zsolt Parragi , Robert Haas , Chao Li , Jakub Wartak , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000b3f990064da378b4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000b3f990064da378b4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Mar 22, 2026 at 2:17=E2=80=AFPM Tom Lane wrote: > I wrote: > > ... We can make this function far simpler > > and more obviously correct if we just accept that we'll read a > > WAL file completely before spilling it. See my proposed > > alternative to 0004, attached. > > Actually, we can make that better yet by not expecting > get_archive_wal_entry to clean up after init_archive's > failure to free all irrelevant hashtable entries. > Better version attached. > > > Yeah, this looks good. I know we also still need to do something about rmtree trying to remove files we haven't closed. But what we have so far in this set LGTM. If you want to push this I'm good, otherwise I'll look at it tomorrow or Tuesday. cheers andrew --000000000000b3f990064da378b4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Mar 22,= 2026 at 2:17=E2=80=AFPM Tom Lane <= tgl@sss.pgh.pa.us> wrote:
I wrote:
> ... We can make this function far simpler
> and more obviously correct if we just accept that we'll read a
> WAL file completely before spilling it.=C2=A0 See my proposed
> alternative to 0004, attached.

Actually, we can make that better yet by not expecting
get_archive_wal_entry to clean up after init_archive's
failure to free all irrelevant hashtable entries.
Better version attached.




Yeah, this looks go= od.=C2=A0 I know we also still need to do something about rmtree trying to = remove files we haven't closed. But what we have so far in this set LGT= M. If you want to push this I'm good, otherwise I'll look at it tom= orrow or Tuesday.

cheers

= andrew
--000000000000b3f990064da378b4--