SHOW max_connections;
max_connections|
---------------+
100 |
SHOW superuser_reserved_connections;
superuser_reserved_connections|
------------------------------+
3 |
SHOW reserved_connections;
reserved_connections|
--------------------+
0 |
SELECT * FROM pg_stat_activity;
datid|datname |pid |leader_pid|usesysid|usename |application_name |client_addr|client_hostname|client_port|backend_start |xact_start |query_start |state_change |wait_event_type|wait_event |state |backend_xid|backend_xmin|query_id|query |backend_type |
-----+--------+-----+----------+--------+--------+-----------------------------------------+-----------+---------------+-----------+-----------------------------+-----------------------------+-----------------------------+-----------------------------+---------------+-------------------+------+-----------+------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------+
5|postgres|19256| | 10|postgres|DBeaver 24.1.5 - Main <postgres> |127.0.0.1 | | 55986|2024-08-28 21:20:25.682 +0800| |2024-08-28 21:20:25.795 +0800|2024-08-28 21:20:25.795 +0800|Client |ClientRead |idle | | | |SHOW search_path |client backend |
5|postgres|22216| | 10|postgres|DBeaver 24.1.5 - Metadata <postgres> |127.0.0.1 | | 55987|2024-08-28 21:20:25.826 +0800| |2024-08-28 22:03:37.376 +0800|2024-08-28 22:03:37.376 +0800|Client |ClientRead |idle | | | |SELECT c.oid,c.*,d.description,pg_catalog.pg_get_expr(c.relpartbound, c.oid) as partition_expr, pg_catalog.pg_get_partkeydef(c.oid) as partition_key ¶FROM pg_catalog.pg_class c¶LEFT OUTER JOIN pg_catalog.pg_description d ON d.objoid=c.oid AND d.objsubid=|client backend |
5|postgres|10736| | 10|postgres|DBeaver 24.1.5 - SQLEditor <Script-2.sql>|127.0.0.1 | | 55988|2024-08-28 21:20:26.003 +0800|2024-08-28 22:03:41.802 +0800|2024-08-28 22:03:41.803 +0800|2024-08-28 22:03:41.803 +0800| | |active| |1032 | |select * from pg_stat_activity |client backend |
| |20852| | | | | | | |2024-08-24 20:56:59.100 +0800| | | | | | | | | | |autovacuum launcher |
| | 9236| | 10|postgres| | | | |2024-08-28 21:13:57.480 +0800| | | |Activity |LogicalLauncherMain| | | | | |logical replication launcher|
| |19468| | | | | | | |2024-08-24 20:56:59.082 +0800| | | |Activity |WalWriterMain | | | | | |walwriter |
| | 3524| | | | | | | |2024-08-24 20:56:58.608 +0800| | | |Activity |CheckpointerMain | | | | | |checkpointer |
| | 8896| | | | | | | |2024-08-24 20:56:58.620 +0800| | | |Activity |BgwriterHibernate | | | | | |background writer |
原文作者:SQL编程思想;如有侵权,请联系管理员删除。