Alex Rivera | Logout

How to find out the connection limit per user on Postgresql?

Asked 2011-01-06T15:54:22.870
63

I need to find out if a connection limit has been set on a Postgresql database on a per user basis.

I know you can set such a limit using:

ALTER USER johndoe WITH CONNECTION LIMIT 2;

Can you check this in the pg_users table?

Edit
Report

1 Answer

38

This information is available in the column rolconnlimit in the view pg_roles
http://www.postgresql.org/docs/current/static/view-pg-roles.html

For roles that can log in, this sets maximum number of concurrent connections this role can make. -1 means no limit.

answered 2011-01-06T16:27:54.770

Your Answer