CyberDem0n / bg_mon

Background worker for monitoring PostgreSQL
MIT License
66 stars 11 forks source link

Use realpath func instead of canonicalize_path #51

Closed hughcapet closed 2 years ago

hughcapet commented 2 years ago

canonicalize_path function was able to remove only trailing '.' and '..' prior to pg15, thus switch to realpath

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-4.9%) to 83.593% when pulling dd9e0854f43f8cd2ff04dc018c0be736605cbb1d on hughcapet:fix/pg_log_size into 8de3b0afb4e3337168b77d26ad4e0c5c89638f53 on CyberDem0n:master.

hughcapet commented 2 years ago

Although realpath function may bring an overhead, will still use it here, as it is already present in get_device https://github.com/CyberDem0n/bg_mon/blob/8de3b0afb4e3337168b77d26ad4e0c5c89638f53/disk_stats.c#L271 :)