pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Förster <paul.foerster@gmail.com>
To: André Hänsel <andre@webkr.de>
Cc: pgsql-general@postgresql.org
Subject: Re: How to use pg_waldump?
Date: Fri, 1 May 2020 14:12:18 +0200
Message-ID: <901FFF6E-A79A-4C34-AE51-62743325F925@gmail.com> (raw)
In-Reply-To: <0c1c01d61fa5$f4f23ff0$ded6bfd0$@webkr.de>
References: <0c1c01d61fa5$f4f23ff0$ded6bfd0$@webkr.de>

Hi André,

> On 01. May, 2020, at 12:47, André Hänsel <andre@webkr.de> wrote:
> 
> I知 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?

try:

pg_waldump -p /var/lib/postgresql/11/main/pg_wal <start-wal> [<end-wal>]

where <start-wal> is the name of the WAL file to start and (optionally) <end-wal> is the WAL file to stop. It reads and shows all information of the WAL files in this range.

Hope, this helps.

Cheers,
Paul




view thread (9+ messages)  latest in thread

Message-ID: <901FFF6E-A79A-4C34-AE51-62743325F925@gmail.com>
Permalink:  ../901FFF6E-A79A-4C34-AE51-62743325F925@gmail.com/
Also on:    postgresql.org/message-id/901FFF6E-A79A-4C34-AE51-62743325F925@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: paul.foerster@gmail.com, andre@webkr.de
  Subject: Re: How to use pg_waldump?
  In-Reply-To: <901FFF6E-A79A-4C34-AE51-62743325F925@gmail.com>
  References: <0c1c01d61fa5$f4f23ff0$ded6bfd0$@webkr.de> <901FFF6E-A79A-4C34-AE51-62743325F925@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox