Fix the recovery script for postgres >= 12.
This commit is contained in:
parent
8e390d20f0
commit
a714e9775b
|
@ -44,6 +44,11 @@ logger "pgpool_recovery_1: backup of the database from $MASTER_HOST to $RECOVERY
|
||||||
|
|
||||||
# Configure the restore_command to use the archive_log WALs we will copy
|
# Configure the restore_command to use the archive_log WALs we will copy
|
||||||
# over in 2nd_stage.sh.
|
# over in 2nd_stage.sh.
|
||||||
|
{% if psql_version >= 12 %}
|
||||||
|
echo "restore_command = 'cp $RECOVERY_DATA/archive_log/%f %p'" | ssh -T $RECOVERY_TARGET "cat >> $RECOVERY_DATA/postgresql.auto.conf"
|
||||||
|
ssh -T "$RECOVERY_TARGET" "touch $RECOVERY_DATA/recovery.signal"
|
||||||
|
{% else %}
|
||||||
echo "restore_command = 'cp $RECOVERY_DATA/archive_log/%f %p'" | ssh -T $RECOVERY_TARGET "cat > $RECOVERY_DATA/recovery.conf"
|
echo "restore_command = 'cp $RECOVERY_DATA/archive_log/%f %p'" | ssh -T $RECOVERY_TARGET "cat > $RECOVERY_DATA/recovery.conf"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
logger "pgpool_recovery_1: create the restore command on $RECOVERY_TARGET"
|
logger "pgpool_recovery_1: create the restore command on $RECOVERY_TARGET"
|
||||||
|
|
Loading…
Reference in New Issue