Re: Trying out libarchive for reading user-generated WAL tarballs - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Trying out libarchive for reading user-generated WAL tarballs
Date
Msg-id CA+hUKGL5zBUxOZAztyiRK9YMTEabmi_bjL-yuFQ-XO4n2fLWRw@mail.gmail.com
Whole thread Raw
In response to Re: Trying out libarchive for reading user-generated WAL tarballs  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Fri, Apr 10, 2026 at 6:33 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Sun, Apr 5, 2026 at 2:42 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> > Perhaps that could be fixed if astreamer_file.c provided
> > "astreamer_file_reader" with the same semantics, so that it could
> > unconditionally call astreamer_pull(privateInfo->archive_streamer),
> > instead of doing the read, push-into-stream itself?  Just a thought.
>
> That seems to work.

Added to open commitfest as
https://commitfest.postgresql.org/patch/6665/.  But I should have
waited for CI before posting the last version, because it eventually
reminded me that Windows needs:

-   streamer->file = fopen(pathname, "r");
+   streamer->file = fopen(pathname, "rb");

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pg_waldump: support decoding of WAL inside tarfile
Next
From: Lakshmi N
Date:
Subject: Add missing CHECK_FOR_INTERRUPTS in autovacuum catalog scan loops