Open 1053531172 opened 5 days ago
From the error result, it can be seen that it detected that the wal log was not archived, but in fact, the archiving of the master node has always been normal.
No, it is detecting that the standby selected for the backup is not receiving WAL data in a timely fashion via streaming replication.
What I want to know is, how does pgbackrest choose which backup library to back up? Can I specify a backup node with normal status and normal stream replication for backup to avoid backup failure caused by abnormal stream replication of the backup node?
You can select which standby is used for a backup by configuring only that standby. If multiple standbys nodes are configured then the first one that accepts a connection will be selected.
We do have plans to be smarter about which standby node we select, but for the most part the current method works well as long as your standbys are up to date. If they are not you may want to prioritize fixing a degraded system rather than applying the additional load of a backup.
Please provide the following information when submitting an issue (feature requests or general comments can skip this):
pgBackRest version:2.47
PostgreSQL version:13.16
Operating system/version - if you have more than one server (for example, a database server, a repository host server, one or more standbys), please specify each: CentOS Linux release 7.2.1511
Did you install pgBackRest from source or from a package? source
Please attach the following as applicable:
pgbackrest.conf
file(s)postgresql.conf
settings applicable to pgBackRest (archive_command
,archive_mode
,listen_addresses
,max_wal_senders
,wal_level
,port
)/var/log/pgbackrest
for the commands run (e.g./var/log/pgbackrest/mystanza_backup.log
)From the error result, it can be seen that it detected that the wal log was not archived, but in fact, the archiving of the master node has always been normal.
It appears that it chose to backup to the backup repository with a stream replication exception, but could not find the wal log. Therefore, it selected the latest wal log, which is not present on the backup repository node with the exception. From a time perspective, the backup was performed on 2024-11-09 07:42, while the push time for 00000002000000F00000056 was 2024-11-09 7:58. I checked the main database and found that the last modification time for this wal log was also 7.58, indicating that the main database's push of wal logs was normal.After the abnormal stream replication is restored to normal from the node, incremental backup becomes normal.
What I want to know is, how does pgbackrest choose which backup library to back up? Can I specify a backup node with normal status and normal stream replication for backup to avoid backup failure caused by abnormal stream replication of the backup node?Thank you very much for your answer.