pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Better generic method of finding all installed Postgres versions?
Date: Wed, 9 Dec 2020 00:15:44 -0600
Message-ID: <4e5a0532-c1f9-d3ef-d060-d3100a003f02@gmail.com> (raw)

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.





Message-ID: <4e5a0532-c1f9-d3ef-d060-d3100a003f02@gmail.com>
Permalink:  ../4e5a0532-c1f9-d3ef-d060-d3100a003f02@gmail.com/
Also on:    postgresql.org/message-id/4e5a0532-c1f9-d3ef-d060-d3100a003f02@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Better generic method of finding all installed Postgres versions?
  In-Reply-To: <4e5a0532-c1f9-d3ef-d060-d3100a003f02@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox