18 Mayıs 2021 Salı

BARMAN archiver errors: FAILED (duplicates: xxx)

 One of our PostgreSQL cluster BARMAN backup was constantly getting "archiver errors: FAILED (duplicates: xxx)" warning via "barman check serverx" command. Also we saw following warnings in barman logfile;

2021-05-18 09:57:02,365 [13875] barman.wal_archiver INFO:       Error: 00000001000000630000005B is already present in server serverx. File moved to errors directory.

 We realized that our server admin was rebooted serverx without notifying us a week ago. So we did'nt properly shut down postgresql cluster.

While investigating the problem we noticed that; everytime serverx postgresql cluster switches a wal file, it tries to send every wal file under pg_wal directory. So duplicate wal files send to barman and they move to "errors" directory. This happens also manually executing switch wal command: "SELECT pg_switch_wal();"