From c1cce0328c5fb7a58977e83e3fa9de7bf437d8b9 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Mon, 30 Nov 2015 11:57:44 +0530 Subject: [PATCH] disable `trigger_file` option from recovery.conf Triggering of a slave to stop replication and enable writing works. However if a second slave (with data persistence) is reconfigured to use the first slave (triggered) as the master, the second slave cannot replicate the data. At the moment the only way to convert a slave to a master is to stop it and start it as a master in which case the above issue is not seen. To avoid users from trying to trigger a slave, we removed the config altogether until the issue can be resolved. --- runtime/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/functions b/runtime/functions index c47815f..4457139 100755 --- a/runtime/functions +++ b/runtime/functions @@ -261,7 +261,7 @@ configure_recovery() { exec_as_postgres touch ${PG_RECOVERY_CONF} ( echo "standby_mode = 'on'"; echo "primary_conninfo = 'host=${REPLICATION_HOST} port=${REPLICATION_PORT} user=${REPLICATION_USER} password=${REPLICATION_PASS} sslmode=${REPLICATION_SSLMODE}'"; - echo "trigger_file = '/tmp/postgresql.trigger'" ) > ${PG_RECOVERY_CONF} + ) > ${PG_RECOVERY_CONF} else set_recovery_param "host" "${REPLICATION_HOST}" set_recovery_param "port" "${REPLICATION_PORT}"