Audit Role Connections

From: Chris Morris <chris(at)mysteryscience(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Audit Role Connections
Date: 2020-05-29 17:42:47
Message-ID: CALrUc2UnY6Rup8-Q_ajOuJofX9OzPNjfX-ObEHjtgS-9gHg6hA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We're using Heroku's PG, and it comes with a default, almost super-user.
I'm wanting to restrict that account for only our production app servers,
and have anyone connecting for personal queries to go through an assigned
role by employee (that's all setup and working).

Other than polling pg_stat_activity (which isn't 100% accurate depending on
timing), is there a good way to audit connections? To detect which roles
are being used for connections?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-05-29 18:22:09 Re: pg_ctl can't start db server
Previous Message Tom Lane 2020-05-29 15:32:14 Re: pg_ctl can't start db server