Postgresql failed to archive some WAL files. fix and reset counter with ‘SELECT pg_stat_reset_shared(‘archiver’);’

When you have such alert you should do fallowing:

  • Ensure that archive log files can be written to destination
  • Execute fallowing command to check failed counter SELECT * FROM pg_stat_archiver\gx
  • Execute fallowing command to reset counters SELECT pg_stat_reset_shared(‘archiver’);