agora inbox for pgsql-admin@postgresql.org  
help / color / mirror / Atom feed
From: Domen Šetar <domen.setar@izum.si>
To: Kashif Zeeshan <kashi.zeeshan@gmail.com>
Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: RE: wal seams to be corrupted
Date: Fri, 19 Jul 2024 06:28:43 +0000
Message-ID: <9c2e2f9c884444109866578df8dca3fe@izum.si> (raw)
In-Reply-To: <CAAPsdhdmjOW8tApxYo0WT5vwJCS3=CSFdBrROUG3zbbDTuubuw@mail.gmail.com>
References: <fb27effbffe84e5e81bc234a388ed929@izum.si>
	<CAAPsdhdmjOW8tApxYo0WT5vwJCS3=CSFdBrROUG3zbbDTuubuw@mail.gmail.com>

Thanks for the answer.
What about to stop postgresql server which is primary in replication and promote another server?

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.setar@izum.si<mailto:domen.setar@izum.si>



From: Kashif Zeeshan <kashi.zeeshan@gmail.com>
Sent: Friday, July 19, 2024 8:10 AM
To: Domen Šetar <domen.setar@izum.si>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: wal seams to be corrupted

Hi Domen

On Fri, Jul 19, 2024 at 10:57 AM Domen Šetar <domen.setar@izum.si<mailto:domen.setar@izum.si>> wrote:
Hi admins,

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?
Yes you should use the  pg_resetwal what it does is clears the write-ahead log (WAL) and optionally resets some other control information stored in the pg_control file. This function is sometimes needed if these files have become corrupted. It should be used only as a last resort, when the server will not start due to such corruption.

You can find the help from the following link
https://www.postgresql.org/docs/current/app-pgresetwal.html

Regards
Kashif Zeeshan

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.setar@izum.si<mailto:domen.setar@izum.si>





Attachments:

  [image/jpeg] image001.jpg (1.3K, ../9c2e2f9c884444109866578df8dca3fe@izum.si/3-image001.jpg)
  download | view image

  [image/jpeg] image002.jpg (1.3K, ../9c2e2f9c884444109866578df8dca3fe@izum.si/4-image002.jpg)
  download | view image

view thread (15+ messages)  latest in thread

Message-ID: <9c2e2f9c884444109866578df8dca3fe@izum.si>
Permalink:  ../9c2e2f9c884444109866578df8dca3fe@izum.si/
Also on:    postgresql.org/message-id/9c2e2f9c884444109866578df8dca3fe@izum.si

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: domen.setar@izum.si, kashi.zeeshan@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: RE: wal seams to be corrupted
  In-Reply-To: <9c2e2f9c884444109866578df8dca3fe@izum.si>

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

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