Better generic method of finding all installed Postgres versions?

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Better generic method of finding all installed Postgres versions?
Date: 2020-12-09 06:15:44
Message-ID: 4e5a0532-c1f9-d3ef-d060-d3100a003f02@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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.

Browse pgsql-admin by date

  From Date Subject
Next Message Khuram Rafique 2020-12-09 08:41:26 How to configure this
Previous Message Ron 2020-12-08 21:40:57 Re: LDAP and roles