From 7912f833a9511b3a69f99bbdbdb642afd94e62e3 Mon Sep 17 00:00:00 2001 From: Anas Anjaria <499739+anasanjaria@users.noreply.github.com> Date: Fri, 22 Mar 2024 17:51:08 +0100 Subject: [PATCH] Adjust wal fast source logic to explicitly connsider data directory Simplified logic of wal_fast can be found here [1] which is as follows: ``` WAL_FAST=$(dirname "$DATA_DIR")/wal_fast ``` Hence, aligning with the same logic to keep things simple. This way, it will not conflict with separate WAL directory too. [1] https://github.com/anasanjaria/spilo/blob/master/postgres-appliance/scripts/basebackup.sh --- postgres-appliance/scripts/restore_command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-appliance/scripts/restore_command.sh b/postgres-appliance/scripts/restore_command.sh index a4bb88939..7164ef5ee 100755 --- a/postgres-appliance/scripts/restore_command.sh +++ b/postgres-appliance/scripts/restore_command.sh @@ -27,7 +27,7 @@ readonly wal_destination=$2 wal_dir=$(dirname "$wal_destination") readonly wal_dir -wal_fast_source=$(dirname "$(dirname "$(realpath "$wal_dir")")")/wal_fast/$wal_filename +wal_fast_source=$(dirname "$PGDATA/wal_fast/$wal_filename") readonly wal_fast_source [[ -f $wal_fast_source ]] && exec mv "${wal_fast_source}" "${wal_destination}"