Closed ng-pe closed 2 years ago
I think I have never received this PR, however commit 7d83483 fixes point 1 and commit 32abd8d fixes point 2.
Thanks for integrating my comments:)
I didn't have time to integrate them :D
It's perfect!
Thanks Gilles!
Hello,
The pg_monitor role allows to use the pg_ls_waldir function introduced in PostgreSQL 10. The pg_monitor role is available on many PostgreSQL PaaS services (like RDS).
1 - Modification of the dump_xlog_stat query to use pg_ls_waldir instead of pg_ls_dir for postgresql 10 and above to be compatible with a user belonging to pg_monitor.
Tested with :
2 - Add an additional control in "if (!&is_superuser($DBUSER)) {" to control if the user belongs to the role pg_monitor to ensure the recovery of wal info is not removed from metrics.
I am preparing a patch in this direction, if you have any comments ...