Re: Postgresql History Error

From: Abdullah Ergin <abdullaherginwork(at)gmail(dot)com>
To: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>, pgadmin-support(at)lists(dot)postgresql(dot)org
Subject: Re: Postgresql History Error
Date: 2023-11-15 09:34:33
Message-ID: CAJZxWEN47s5N=WYnmJ0rEXVyu8Cd=KnowMRx+FvhYvo5xjo=jg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support pgsql-admin

Hello,
I wonder if this topic reached anyone?

Abdullah Ergin <abdullaherginwork(at)gmail(dot)com>, 13 Kas 2023 Pzt, 21:23
tarihinde şunu yazdı:

> I've incorrectly conveyed the stanza name in pgbackrest.conf; the correct
> one is as follows:
>
> ```
> [mydb_stanza]
> pg1-path=/mnt/postgresql/13/mydb
> pg1-port=5433
> ```
>
> 13 Kasım 2023 Pazartesi tarihinde Abdullah Ergin <
> abdullaherginwork(at)gmail(dot)com> yazdı:
>
>> Hi Dear,
>>
>> In my Postgresql master server, I have found two files named
>> "00000002.history" and "00000003.history" inside the pg_wal directory. Upon
>> inspecting their contents, I discovered the following information: "1
>> 0/35000000 no recovery target specified."
>>
>> To investigate further, I checked the postgresql.auto.conf file in the
>> data directory of my cluster. I found a restore_command parameter with the
>> following information:
>>
>> ```
>> # Do not edit this file manually!
>> # It will be overwritten by the ALTER SYSTEM command.
>>
>> # Recovery settings generated by pgBackRest restore on 2021-09-29 01:04:40
>> restore_command = 'pgbackrest --stanza=logdb_stanza archive-get %f "%p"'
>> ```
>>
>> From what I understand, a restore operation was performed on the cluster
>> before, but something went wrong, resulting in the creation of two history
>> files in the pg_wal directory. I considered whether the issue lies in the
>> archive_command parameter, but I couldn't find anything incorrect:
>>
>> ```
>> # - Archiving -
>> archive_mode = on
>> archive_command = 'pgbackrest --stanza=mydb_stanza archive-push %p'
>> ```
>>
>> In the pgbackrest.conf file, mydb_stanza is configured as follows:
>>
>> ```
>> [logdb_stanza]
>> pg1-path=/mnt/postgresql/13/mydb
>> pg1-port=5433
>> ```
>>
>> These files are causing an error on the replica server. While the master
>> server's cluster is active, the replica cluster on the replication server
>> encounters the following error:
>>
>> ```
>> sh: 1: pgbackrest: not found
>> 2023-11-09 17:01:44.700 +03 [767228] FATAL: could not restore file
>> "00000004.history" from archive: command not found
>> 2023-11-09 17:01:44.703 +03 [767227] LOG: startup process (PID 767228)
>> exited with exit code 1
>> 2023-11-09 17:01:44.703 +03 [767227] LOG: aborting startup due to startup
>> process failure
>> 2023-11-09 17:01:44.745 +03 [767227] LOG: database system is shut down
>> pg_ctl: could not start server
>> Examine the log output.
>> ```
>>
>> I am considering deleting these history files on the master and
>> restarting replication. However, I am concerned about potentially causing
>> harm to the master cluster.
>> Thank you.
>>
>

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message Aditya Toshniwal 2023-11-15 09:46:37 Re: Issue with launching PGAdmin 4 on Mac OC
Previous Message Kanmani Thamizhanban 2023-11-14 23:42:21 Fwd: Issue with launching PGAdmin 4 on Mac OC

Browse pgsql-admin by date

  From Date Subject
Next Message Edwin UY 2023-11-15 10:51:34 Upgrading/Updating Extensions
Previous Message Tom Lane 2023-11-14 23:25:46 Re: pg_restore -L reordering of the statements does not work