Thread: Better generic method of finding all installed Postgres versions?

Better generic method of finding all installed Postgres versions?

From
Ron
Date:
pg_lscluster is great, but it's Debian/Ubuntu specific.

$ realfs=$(df -x tmpfs -x devtmpfs | tail -n +2 | awk '{print $6;}' | xargs)
$ find ${realfs} -xdev -type f -name pg_ctl |& grep -v "Permission denied"

This works on both Ubuntu 18.04 and RHEL 8.3 (the only systems I have access 
to), but wonder if there's a Better Way.  (I didn't grep  netstat because 
the cluster might not be running.)

Thanks

-- 
Angular momentum makes the world go 'round.