mirror of
https://github.com/wassname/docker-postgresql.git
synced 2026-06-27 23:07:22 +08:00
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.
This commit is contained in:
+1
-1
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user