Skip to content

Instantly share code, notes, and snippets.

@StevenJL
Created January 23, 2021 19:44
Show Gist options
  • Select an option

  • Save StevenJL/96f844526c752b093f855838ccec1ea0 to your computer and use it in GitHub Desktop.

Select an option

Save StevenJL/96f844526c752b093f855838ccec1ea0 to your computer and use it in GitHub Desktop.
psql max connections
/* See the number of max connections the server supports */
SHOW max_connections;
/*
The number of connections being used.
This includes both client connections
as well as connections to WAL sender
processes (used in replication)
*/
SELECT COUNT(*) FROM
pg_stat_activity;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment