check_postgres icon indicating copy to clipboard operation
check_postgres copied to clipboard

check_disk_space: handle relative symlinks for the WAL directory

Open ibarwick opened this issue 7 years ago • 0 comments

If the WAL directory (pg_xlog or pg_wal) resolves to a symbolic link, e.g. "../some-wal-dir", the check fails with an error like:

ERROR: Invalid result from command "/bin/df -kP "../some-wal-dir" 2>&1": /bin/df: "../some-wal-dir": No such file or directory

This patch checks for a relative symlink and extracts the actual WAL directory using abs_path().

Not sure if it's feasible to add a test for this, if it is please let me know.

ibarwick avatar Apr 05 '18 01:04 ibarwick