Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fnQHH-0002oR-7C for pgsql-general@arkaria.postgresql.org; Wed, 08 Aug 2018 15:21:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fnQHF-0001hD-Ex for pgsql-general@arkaria.postgresql.org; Wed, 08 Aug 2018 15:21:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fnQHF-0001h6-2r for pgsql-general@lists.postgresql.org; Wed, 08 Aug 2018 15:21:33 +0000 Received: from relay-direct21.mxroute.com ([185.234.75.3]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fnQHB-00068A-Ps for pgsql-general@lists.postgresql.org; Wed, 08 Aug 2018 15:21:31 +0000 Received: from filter002.mxroute.com (unknown [185.133.192.179]) by relay-direct21.mxroute.com (Postfix) with ESMTP id A17333F6E3 for ; Wed, 8 Aug 2018 15:21:27 +0000 (UTC) Received: from one.mxroute.com (one-outgoing.mxroute.com [23.92.70.115]) by filter002.mxroute.com (Postfix) with ESMTPS id 6CC3A3F537 for ; Wed, 8 Aug 2018 15:21:27 +0000 (UTC) To: pgsql-general@lists.postgresql.org From: Vijay Rajah Subject: Postgres replication -- .done file in slave Message-ID: Date: Wed, 8 Aug 2018 20:51:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------9F94E5E25B577417E05141A0" Content-Language: en-US X-AuthUser: me@rvijay.me List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------9F94E5E25B577417E05141A0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 =60archive_mode =off#We dont need this aswe will be usingbarman streaming max_wal_senders =5wal_keep_segments =10wal_log_hints =onhot_standby =onmax_replication_slots =5synchronous_commit =local| Also here is what I have in recovery.conf |standby_mode =onprimary_conninfo ='host=10.xx.xxx.xx port=5432 user=replication password=****** application_name=salve_syncstdby'trigger_file ='//make_me_master'archive_cleanup_command ='/usr/pgsql-9.5/bin/pg_archivecleanup %r'primary_slot_name ='slave_repl'recovery_target_timeline =latest restore_command ='/usr/bin/barman-wal-restore -p 4 -s -U barman %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 --------------9F94E5E25B577417E05141A0 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit 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

--------------9F94E5E25B577417E05141A0--