首页 > 解决方案 > 更改配置后 statsinfo 扩展不活动

问题描述

我已经安装了 statinfo

[postgres@ 20180911 07:24:54 CentOS7604 data]$ rpm -qa | grep statsinfo
pg_statsinfo-10.0-1.pg10.rhel7.x86_64

我添加了以下行:

#shared_preload_libraries = 'pg_statsinfo' 

我已经重新启动了 Postgres

[postgres@ 20180911 07:25:00 CentOS7604 data]$ ps -ef | grep postgres
postgres  1109     1  0 07:07 ?        00:00:00 /usr/pgsql-10/bin/postmaster -D /var/lib/pgsql/10/data/
postgres  1148  1109  0 07:07 ?        00:00:00 postgres: logger process
postgres  1169  1109  0 07:07 ?        00:00:00 postgres: checkpointer process
postgres  1171  1109  0 07:07 ?        00:00:00 postgres: writer process
postgres  1172  1109  0 07:07 ?        00:00:00 postgres: wal writer process
postgres  1173  1109  0 07:07 ?        00:00:00 postgres: autovacuum launcher process
postgres  1174  1109  0 07:07 ?        00:00:00 postgres: stats collector process
postgres  1175  1109  0 07:07 ?        00:00:00 postgres: bgworker: logical replication launcher
root      1247  1246  0 07:16 pts/0    00:00:00 su - postgres
postgres  1248  1247  0 07:16 pts/0    00:00:00 -bash
postgres  1300  1248  0 07:25 pts/0    00:00:00 ps -ef
postgres  1301  1248  0 07:25 pts/0    00:00:00 grep postgres
[postgres@ 20180911 07:25:35 CentOS7604 data]$

谁能告诉如何解决这个问题?

此致

标签: linuxpostgresql

解决方案


如手册中所述#,行首表示该行是注释并且不是“活动的”。要使该行“做某事”,请删除#

因此,您需要将该行更改为:

shared_preload_libraries = 'pg_statsinfo'

#注意行首的缺失


推荐阅读