官术网_书友最值得收藏!

Using additional information in pg_stat_activity

Before PostgreSQL 10.0, pg_stat_activity only contained information about normal backend processes serving end users (connections). However, this has changed. Since PostgreSQL 10.0, a lot more information is exposed. It is possible to figure out what these other system processes are doing.

The following listing shows the content of  pg_stat_activity on an idle database instance:

test=# \x 
Expanded display is on. 

test=# SELECT pid, wait_event_type, wait_event, backend_type FROM pg_stat_activity ;
-[ RECORD 1 ]---+-------------------- pid | 12159 wait_event_type | Activity wait_event | AutoVacuumMain backend_type | autovacuum launcher -[ RECORD 2 ]---+-------------------- pid | 12161 wait_event_type | Activity wait_event | LogicalLauncherMain backend_type | background worker -[ RECORD 3 ]---+-------------------- pid | 12628 wait_event_type | wait_event | backend_type | client backend -[ RECORD 4 ]---+-------------------- pid | 12156 wait_event_type | Activity wait_event | BgWriterMain backend_type | background writer -[ RECORD 5 ]---+-------------------- pid | 12155 wait_event_type | Activity wait_event | CheckpointerMain backend_type | checkpointer -[ RECORD 6 ]---+-------------------- pid | 12157 wait_event_type | Activity wait_event | WalWriterMain backend_type | walwriter

What you see here is that every server process is listed. It will allow you to gain some insights into what is happening the server.

主站蜘蛛池模板: 清河县| 古浪县| 武穴市| 九龙城区| 满洲里市| 庄浪县| 凤山市| 紫云| 那曲县| 思南县| 从化市| 卓资县| 宜宾市| 阳江市| 阿克陶县| 商丘市| 霍林郭勒市| 扎鲁特旗| 岑巩县| 南宫市| 大姚县| 南丰县| 梁河县| 和政县| 朝阳区| 瑞安市| 蕲春县| 越西县| 柳河县| 托里县| 伊金霍洛旗| 武川县| 和田市| 怀安县| 文水县| 马关县| 金沙县| 太湖县| 旅游| 泸西县| 洪泽县|