gpt4 book ai didi

postgresql - Autovacuum 未在 Openshift Online Postgres 盒式磁带上运行

转载 作者:行者123 更新时间:2023-11-29 11:25:13 24 4
gpt4 key购买 nike

我的 Openshift Online cartridge 上有 Postgres 9.2。使用 Pgadmin3,我已经启用(通过勾选框)postgresql.conf 的 autovuum 设置。但是,autovacuum 似乎没有运行。

这是我的:

  1. ps -ef | grep -i 真空没有显示 autovacuum 过程。

  2. 使用 psql 控制台,show autovacuum,说它的值为 ON

  3. 使用 psql 控制台,SELECT schemaname, relname, last_vacuum, last_autovacuum from FROM pg_stat_user_tables; 在 last_vacuum 和 last_autovacuum 列中没有给出任何值,即使我使用 pgadmin3 通过 Maintenance 函数执行了手动 Vacuum。

  4. pgAdminIII 中数据库的属性选项卡显示“未运行”的 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 restart -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

虽然 track_counts 已经在 postgresql.conf 中设置为 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是一个看起来很有前途的批处理脚本,但要小心强制真空可能涉及的副作用(当然取决于您的应用程序)。

关于postgresql - Autovacuum 未在 Openshift Online Postgres 盒式磁带上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23215429/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com