Re: pg_waldump: support decoding of WAL inside tarfile

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Amul Sul <sulamul(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_waldump: support decoding of WAL inside tarfile
Date: 2026-03-19 20:48:27
Message-ID: CAN4CZFMn_9wgEG0q-9CCXynZ85FzVFoyVU=okWESA42U542ajw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

Path is ignored with a positional argument, I think this is a bug?

This fails:

pg_waldump --path /wal/dir 000000010000000000000001

And this works:

pg_waldump --path /wal/dir --start 0/01000028 --end 0/010020F8

+{
+ int fname_len = strlen(fname);
+

Shouldn't this use size_t?

+ /*
+ * Setup temporary directory to store WAL segments and set up an exit
+ * callback to remove it upon completion.
+ */
+ setup_tmpwal_dir(waldir);

Maybe this could be deferred to be created only on first use? If I
understand correctly, in a typical scenario waldump won't use this
temporary directory, yet it always creates it.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2026-03-19 20:57:32 Re: EXPLAIN: showing ReadStream / prefetch stats
Previous Message Robert Haas 2026-03-19 20:38:23 Re: pg_plan_advice