Use the client tools to connect pg, the connection fails, an error the following error:
FATAL: remaining connection slots are reserved for non-replication superuser connections
View the database connection status and configuration information
select * from pg_stat_activity where pid<>pg_backend_pid() and state='idle';##pg_backend_pid()的结果是当前会话的pid select datname,datconnlimit from pg_database ; select current_setting('max_connections'); select current_setting('superuser_reserved_connections');
Found max_connections parameter is set too low.
Because it is a test environment, it is first connected idle state to kill:
## to all the database kill off all idle sessions select pg_terminate_backend (pid) from pg_stat_activity where pid <> pg_backend_pid () and state = 'idle';
Then modify the value of the parameter max_connections.