pg_waldump got an error with waldump file generated by initdb

Started by Dong Wook Leeover 3 years ago3 messages
#1Dong Wook Lee
sh95119@gmail.com

Hi, hackers

I don't know if this is an error.
when I do ./initdb -D ../data and execute pg_waldump like this, In the last part I got an error.

```
./pg_waldump ../data/pg_wal/000000010000000000000001
```

pg_waldump: error: error in WAL record at 0/1499990: invalid record length at 0/1499A08: wanted 24, got 0

my environment is `16devel on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit`
Is this normal?

#2Andres Freund
andres@anarazel.de
In reply to: Dong Wook Lee (#1)
Re: pg_waldump got an error with waldump file generated by initdb

Hi,

On 2022-07-10 21:51:04 +0900, Dong Wook Lee wrote:

I don't know if this is an error.
when I do ./initdb -D ../data and execute pg_waldump like this, In the last part I got an error.

```
./pg_waldump ../data/pg_wal/000000010000000000000001
```

pg_waldump: error: error in WAL record at 0/1499990: invalid record length at 0/1499A08: wanted 24, got 0

my environment is `16devel on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit`
Is this normal?

Yes, that's likely normal - i.e. pg_waldump has reached the point at which the
WAL ends.

Greetings,

Andres Freund

#3Justin Pryzby
pryzby@telsasoft.com
In reply to: Andres Freund (#2)
Re: pg_waldump got an error with waldump file generated by initdb

On Sun, Jul 10, 2022 at 02:39:00PM -0700, Andres Freund wrote:

On 2022-07-10 21:51:04 +0900, Dong Wook Lee wrote:

I don't know if this is an error.
when I do ./initdb -D ../data and execute pg_waldump like this, In the last part I got an error.

```
./pg_waldump ../data/pg_wal/000000010000000000000001
```

pg_waldump: error: error in WAL record at 0/1499990: invalid record length at 0/1499A08: wanted 24, got 0

my environment is `16devel on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit`
Is this normal?

Yes, that's likely normal - i.e. pg_waldump has reached the point at which the
WAL ends.

It's the issue that's fixed by this patch.

38/2490 Make message at end-of-recovery less scary Kyotaro Horiguchi
https://commitfest.postgresql.org/38/2490/