Postgresql 如何在postgres中执行真空命令而不发出警告?

Postgresql 如何在postgres中执行真空命令而不发出警告?,postgresql,performance,vacuum,Postgresql,Performance,Vacuum,正在尝试将vacuum作为postgresql数据库,但在使用以下命令/警告清理大约50条记录后停止: backend> vacuum FULL; WARNING: database "postgres" must be vacuumed within 988308 transactions HINT: To avoid a database shutdown, execute a full-database VACUUM in "postgres". 后端> // again

正在尝试将
vacuum
作为postgresql数据库,但在使用以下命令/警告清理大约50条记录后停止:

 backend> vacuum FULL;
 WARNING:  database "postgres" must be vacuumed within 988308 transactions
HINT:  To avoid a database shutdown, execute a full-database VACUUM in "postgres".
后端>

// again

WARNING:  database "postgres" must be vacuumed within 988242 transactions
HINT:  To avoid a database shutdown, execute a full-database VACUUM in "postgres".
如何调用它,使其不经常停止?Ty:^)

真空(满)
真空
大不相同,在这种情况下不需要真空<代码>真空(满)不仅仅是更好的
真空

你不知怎么把自己弄到了一个坏地方。如果您未能成功地在a内的
postgres
数据库上运行正常的
真空
。百万事务,您的数据库将遭受数据丢失

您必须使用连接到
postgres
数据库的
--single
选项启动PostgreSQL(有关详细信息,请参阅文档),然后运行

VACUUM
可能会有一些你必须首先消除的障碍。这可能是

  • 长时间运行的事务(在单用户模式下启动时消失)

  • 孤立事务

  • 孤立的复制插槽


有关更多信息,请参阅。

您可能可以运行
真空冷冻
,而不是使用
完全
,可能只是常规的
真空
也可以工作。另请参见:另一件要做的事情是设置自动吸尘器,以便它按照某种计划处理吸尘。