How to use pg_waldump?

From: André Hänsel <andre(at)webkr(dot)de>
To: <pgsql-general(at)postgresql(dot)org>
Subject: How to use pg_waldump?
Date: 2020-05-01 10:47:44
Message-ID: 0c1c01d61fa5$f4f23ff0$ded6bfd0$@webkr.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I’m using pgBackRest for incremental backups which, as far as I understand,
use the WAL. These backups are relatively large, so I wanted to take a look
at my WAL. I understand pg_waldump is the tool for this.

However, I struggle with its usage.

The --help output suggests all command line parameters are optional, but
running it like that yields "pg_waldump: no arguments specified". So I tried
"pg_waldump -z" which yields "pg_waldump: FATAL: could not find any WAL
file". Ok, so apparently it doesn't know the location of the WAL files. I
then tried "pg_waldump -p /var/lib/postgresql/11/main/pg_wal".

Now I get "pg_waldump: no start WAL location given". And this is where I'm
stuck. I don't know any WAL location. I don't even know how far back my WAL
goes, that's one thing I want to find out, among other things.

On https://www.postgresql.org/docs/11/pgwaldump.html it says about
"--start":
> WAL location at which to start reading. The default is to start reading
the first valid log record found in the earliest file found.

If that's the default, why does it ask me for a WAL location?

What do I need to do?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Förster 2020-05-01 12:12:18 Re: How to use pg_waldump?
Previous Message legrand legrand 2020-05-01 09:26:13 Re: pg_stat_statements : how to catch non successfully finished statements ?