| 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-13 18:23:21 |
| Message-ID: | CAJZxWENU9Kr_1BDdX1EHft4A4VdRjmiFhXMDSDGp1oN9vcufaQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgadmin-support pgsql-admin |
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.
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kanmani Thamizhanban | 2023-11-14 17:13:36 | Issue with launching PGAdmin 4 on Mac OC |
| Previous Message | Abdullah Ergin | 2023-11-13 17:57:06 | Postgresql History Error |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | B Liu | 2023-11-14 08:41:47 | Re: pgagent-pg16 could not start: Error 1053 |
| Previous Message | Abdullah Ergin | 2023-11-13 17:57:06 | Postgresql History Error |