Skip to content

Commit

Permalink
Adjust wal fast source logic to explicitly connsider data directory
Browse files Browse the repository at this point in the history
Simplified logic of wal_fast can be found here [1] which is as follows:
```
WAL_FAST=./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
  • Loading branch information
anasanjaria committed Mar 22, 2024
1 parent 1b29c95 commit 90800a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion postgres-appliance/scripts/restore_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 90800a8

Please sign in to comment.