Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_disk_space: handle relative symlinks for the WAL directory #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ibarwick
Copy link

@ibarwick ibarwick commented Apr 5, 2018

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.

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().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant