加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql – Autovacuum未在Openshift Online Postgres盒式磁

发布时间:2020-12-13 18:11:02 所属栏目:百科 来源:网络整理
导读:我的Openshift在线墨盒上有Postgres 9.2.使用Pgadmin3,我已经启用(通过勾选方框) postgresql.conf的autovuum设置.但是,autovacuum似乎没有运行. 这是我有的: ps -ef | grep -i vacuum 没有显示自动真空过程. 使用psql控制台,显示autovacuum,表示其值为ON 从
我的Openshift在线墨盒上有Postgres 9.2.使用Pgadmin3,我已经启用(通过勾选方框) postgresql.conf的autovuum设置.但是,autovacuum似乎没有运行.

这是我有的:

> ps -ef | grep -i vacuum
没有显示自动真空过程.
>使用psql控制台,显示autovacuum,表示其值为ON
>从FROM pg_stat_user_tables使用psql控制台,SELECT schemaname,relname,last_vacuum,last_autovacuum;在last_vacuum和last_autovacuum列中没有给出任何值,即使我使用pgadmin3进行了手动真空维护功能.
> pgAdminIII中db的属性选项卡表示’未运行’的AUTOVACUUM值

我错过了什么?

编辑
当我试图在服务器上找到文件时,我也无法访问Openshift Online上的postgresql.conf – 希望手动编辑文件而不是使用pgAdminIII.
– 发现这个https://www.openshift.com/forums/openshift/how-do-i-set-maxpreparedtransactions-on-my-postgresql-cartridge我现在能够查看/编辑我的postgresql.conf.显然autovacuum已经打开,因此conf具有正确的设置.

当问题pg_ctl重启-m fast我得到了

LOG:  could not bind socket for statistics collector: Permission denied 
LOG:  trying another address for the statistics collector 
LOG:  could not bind socket for statistics collector: Permission denied 
LOG: trying another address for the statistics collector 
LOG:  could not bind socket for statistics collector: Cannot assign requested address LOG:  trying another address for the statistics collector 
LOG:  could not bind socket for statistics collector: Cannot assign requested address LOG:  disabling statistics collector for lack of working socket 
WARNING:  autovacuum not started because of misconfiguration 
HINT:  Enable the "track_counts" option. 
LOG:  database system was shut down at 2014-04-22 09:58:19 GMT 
LOG:  database system is ready to accept connections

虽然在postgresql.conf中已将track_counts设置为on

很抱歉这么愚蠢,但任何帮助或指示非常感谢.
先感谢您.

我遇到了类似的问题,并在 this discussion中找到了一个有用的提示:

… for some insane reason,openshit disabled localhost,and autovacuum only connects to localhost,I suppose it makes sense that they wouldn’t want to be trying to vacuum a remote db… but openshit breaks autovacuum.

我找到的一个解决方案(我可能会使用)是手动添加一个强制真空的cronjob. here是一个看起来很有前途的批处理脚本,但要注意强制真空可能涉及的副作用(当然取决于你的app).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读