Thread: Postgres replication -- .done file in slave

Postgres replication -- .done file in slave

From
Vijay Rajah
Date:
Hello Everyone,

I have a postgres 9.5 with Master slave setup. The slave is a streaming replication client.

I have a lot ( >100k ) of .done files in my slave's pg_xlog/archive_status/ directory

Since this is a streaming replication I have disabled archive_mode in both master & slave. Also, I use barman for backup, which also uses streaming backup for backups.

Here is my relevant part of postgresql .conf file

wal_level = hot_standby
archive_timeout = 60
archive_mode = off #We dont need this as we will be using barman streaming
max_wal_senders = 5
wal_keep_segments = 10
wal_log_hints = on
hot_standby = on
max_replication_slots = 5
synchronous_commit = local

Also here is what I have in recovery.conf

standby_mode = on
primary_conninfo = 'host=10.xx.xxx.xx port=5432 user=replication password=****** application_name=salve_syncstdby'
trigger_file = '/<datadir>/make_me_master'
archive_cleanup_command = '/usr/pgsql-9.5/bin/pg_archivecleanup </WALDIR> %r'
primary_slot_name = 'slave_repl'
recovery_target_timeline =  latest
restore_command = '/usr/bin/barman-wal-restore -p 4 -s <Barman_IP> -U barman <db_name> %f %p'

Is it ok to clear the .done files?


-Thanks in advance

Vijay


PS: I have posted the same question in https://stackoverflow.com/questions/51725092/postgres-replication-done-file-in-slave