浅析[53300] FATAL: remaining connection slots are reserved for non-replication superuser connections

  使用psql无法连接数据库,并报错 FATAL:53300

(1)psql: FATAL: 53300: remaining connection slots are reserved for non-replication superuser connections

(2)普通用户的连接已满,保留用于非复制的超级用户连接。

  由于连接已满,可以关闭空闲的连接。

1、查询当前所有连接的状态

select datname,pid,application_name,state from pg_stat_activity;

2、如何查看为超级用户保留的连接数

show superuser_reserved_connections;

3、当前总共正在使用的连接数:

select count(1) from pg_stat_activity;

4、显示系统最大连接数

show max_connections;

5、显示系统保留的用户数

show superuser_reserved_connections;

6、通过pid终止空闲连接

select pg_terminate_backend(pid) from pg_stat_activity; 
原文地址:https://www.cnblogs.com/goloving/p/14894362.html