pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Domen Šetar <domen.setar@izum.si>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: wal seams to be corrupted
Date: Fri, 19 Jul 2024 09:03:12 +0200
Message-ID: <bfa94bdcaf6c805a4f9c0224d0a245306357a317.camel@cybertec.at> (raw)
In-Reply-To: <fb27effbffe84e5e81bc234a388ed929@izum.si>
References: <fb27effbffe84e5e81bc234a388ed929@izum.si>

On Fri, 2024-07-19 at 05:57 +0000, Domen Šetar 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?

Don't listen to any advice to run "pg_resetwal".
Only consider switching to the standby if your primary crashes because the disk is full.

You need to determine the cause of the problem.

1. All error messages from "archive_command" end up in the log file.
   Search for those, they may help you determine the cause.

2. Is there a file /var/lib/pgsql/ArchiveDir/000000010000044E0000009D ?
   If yes, delete it, and the problem should be solved.

3. If there is no such file, it must be the "cp" command that is
   failing.  In that case, you should definitely see an error message
   about that in the log file.  Likely causes:

   - the permissions are not right (try by running the "cp" command as
     user "postgres" manually)

   - the target directory does not exist

   - the target directory is full

Yours,
Laurenz Albe





view thread (15+ messages)  latest in thread

Message-ID: <bfa94bdcaf6c805a4f9c0224d0a245306357a317.camel@cybertec.at>
Permalink:  ../bfa94bdcaf6c805a4f9c0224d0a245306357a317.camel@cybertec.at/
Also on:    postgresql.org/message-id/bfa94bdcaf6c805a4f9c0224d0a245306357a317.camel@cybertec.at

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, domen.setar@izum.si, pgsql-admin@lists.postgresql.org
  Subject: Re: wal seams to be corrupted
  In-Reply-To: <bfa94bdcaf6c805a4f9c0224d0a245306357a317.camel@cybertec.at>

* 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