Skip to content

Instantly share code, notes, and snippets.

@altitdb
Created December 19, 2018 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save altitdb/2032edfb1ba2fbc527e336aa420d07c1 to your computer and use it in GitHub Desktop.
Save altitdb/2032edfb1ba2fbc527e336aa420d07c1 to your computer and use it in GitHub Desktop.
select * from
(select count(*) used from pg_stat_activity) q1,
(select setting::int res_for_super from pg_settings where name=$$superuser_reserved_connections$$) q2,
(select setting::int max_conn from pg_settings where name=$$max_connections$$) q3;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment