RE: wal seams to be corrupted

From: Domen Šetar <domen(dot)setar(at)izum(dot)si>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: RE: wal seams to be corrupted
Date: 2024-07-19 06:22:08
Message-ID: 3c9b31a424f949078683f95d601a1bb8@izum.si
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I didn't claim that wal file is corrupted. I just say that archiver fail to copy it sucessfully so I persume, that something must be wrong with wal file.
And I need to fix it becuse this problem stops wals to move from pg_wal to archive directory.

Best regards!
[izum]

Domen Šetar
Computer Systems Support
IZUM – Institute of Information Science | Prešernova ulica 17 | 2000 Maribor | Slovenia
T: +386 2 25 20 339 | M: +386 41 676 342 | www.izum.si<http://www.izum.si/> | domen(dot)setar(at)izum(dot)si<mailto:domen(dot)setar(at)izum(dot)si>

From: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Sent: Friday, July 19, 2024 8:16 AM
To: Domen Šetar <domen(dot)setar(at)izum(dot)si>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: wal seams to be corrupted

On Thursday, July 18, 2024, Domen Šetar <domen(dot)setar(at)izum(dot)si<mailto:domen(dot)setar(at)izum(dot)si>> wrote:
The number of wal files on my postgresql server is rising, because it seams that one wal is corrupted. Postgrsql is running normaly. I see this in postgresql log file:

2024-07-19 07:44:12 CEST [2205]: [32288-1] user=,db=,app=,client= DETAIL: The failed archive command was: test ! -f /var/lib/pgsql/ArchiveDir/000000010000044E0000009D && cp pg_wal/000000010000044E0000009D /var/lib/pgsql/ArchiveDir/000000010000044E0000009D

Usualy helped if I deleted wal in ArchiveDir directory. But not this time. Wal is copied again from pg_wal to ArchiveDir directory and error message continues.
What can I do to solve this problem? Is pg_resetwal solution fort his problem? If it is, how to use it?

Without knowing why the archive command failed it is impossible to say. But archiving doesn’t impact the server producing the WAL so messing with it isn’t a useful approach. Writing a better archive command is where you should expend your efforts.

If the WAL file is corrupt, which you’ve not shown, but the server is running, doing a full checkpoint and the. physical backup that doesn’t require the problematic WAL would let you not care about it since you would not need it for recovery.

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2024-07-19 06:27:36 Re: wal seams to be corrupted
Previous Message David G. Johnston 2024-07-19 06:15:43 Re: wal seams to be corrupted