What are the minimum required permissions for pg_isready

Started by PG Bug reporting formabout 2 years ago2 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/app-pg-isready.html
Description:

Hello,

The documentation does not specify what are the minimum required permissions
for setting up pg_isready .
I was wondering if this could be added so devops teams know how to create a
user that is used only for monitoring postgresql.

I assume this user will need to connect and nothing else ?
I also assume we would need to drop public access for that user ?

Thanks,
Eugen

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: What are the minimum required permissions for pg_isready

PG Doc comments form <noreply@postgresql.org> writes:

The documentation does not specify what are the minimum required permissions
for setting up pg_isready .

There are none. Per the documentation:

It is not necessary to supply correct user name, password, or
database name values to obtain the server status; however, if
incorrect values are provided, the server will log a failed
connection attempt.

If you don't want log spam about failed connections, you'd need
a user with privilege to connect to the mentioned database.
Otherwise, not.

regards, tom lane