Question

#PostgreSQL - Archive log cleanup fails

  • 4 April 2024
  • 2 replies
  • 26 views

Badge +4

Hello Team,

Greetings!

Scenario: 1

Server setup: 2 node (ASYNC) streaming replication with EFM configured + Witness node

Backup schedule: full + log only backup + advanced logic etc., 

Archive Delete option box is checked

When node 2 fails (standby), full backup gets triggered and consecutive log only backups are running; however archive log clean up function fails and eventually log clean up is avoided on node 1 (Primary, only standing node) 

Is this expected? How can we ensure that archive log clean up happens when all of the standby’s are down?

Scenario: 2

Server setup: 4 node (SYNC) streaming replication with EFM configured + Witness node

Backup schedule: full + log only backup + advanced logic etc., 

Archive Delete option box is checked

When node 2,3,4 fails (standby), full backup gets triggered and consecutive log only backups are running; however archive log clean up function fails and eventually log clean up is avoided on node 1 (Primary, only standing node) 

Is this expected? How can we ensure that archive log clean up happens when all of the standby’s are down?

Kindly revert for any clarification. 

Thanks,

Kamal


2 replies

Userlevel 5
Badge +12

Hello @Kamal Kumar 

Thanks for the question, these issues you are seeing will require a log deep dive to see why they are failing during a node outage. I recommend a support ticket as community is better targeted for general questions and top level troubleshooting when this will need a deep dive.

 

Kind regards

Albert Williams

Userlevel 5
Badge +13

Hi @Kamal Kumar ,

We wait for the archive logs to be applied on the standby nodes before deleting them from primary node. However, in your case you seem to have all your standby nodes down. In this scenario what you see is expected, as these logs will be needed for standby nodes to come back to sync. Otherwise standby node to be replicated from scratch again.

However, we do have an additional setting to force the deletion of archive logs on primary without waiting to be applied on the standby nodes. But please exercise caution when you use this setting.

sPGAlwaysDeleteLogsOnMaster

https://documentation.commvault.com/2023e/expert/managing_logs_on_master_and_standby_server_instances.html

 

Thanks,

Sunil

Reply