Re: Postgresql History Error

Поиск
Список
Период
Сортировка
От Abdullah Ergin
Тема Re: Postgresql History Error
Дата
Msg-id CAJZxWEN47s5N=WYnmJ0rEXVyu8Cd=KnowMRx+FvhYvo5xjo=jg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgresql History Error  (Abdullah Ergin <abdullaherginwork@gmail.com>)
Список pgsql-admin
Hello,
I wonder if this topic reached anyone?

Abdullah Ergin <abdullaherginwork@gmail.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@gmail.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.

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_restore -L reordering of the statements does not work
Следующее
От: Edwin UY
Дата:
Сообщение: Upgrading/Updating Extensions