Re: wal seams to be corrupted - Mailing list pgsql-admin

From David G. Johnston
Subject Re: wal seams to be corrupted
Date
Msg-id CAKFQuwYKJ6HBV7XLHk+Bu_bOTi38oeiSgMULXUh_it7tA2Ok=Q@mail.gmail.com
Whole thread Raw
In response to wal seams to be corrupted  (Domen Šetar <domen.setar@izum.si>)
Responses RE: wal seams to be corrupted
List pgsql-admin
On Thursday, July 18, 2024, Domen Šetar <domen.setar@izum.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.

pgsql-admin by date:

Previous
From: Muhammad Ikram
Date:
Subject: Re: wal seams to be corrupted
Next
From: Domen Šetar
Date:
Subject: RE: wal seams to be corrupted