当前位置: 首页 > 工具软件 > Greenplum DB > 使用案例 >

Greenplum数据库:HINT: To avoid a database shutdown, execute a full-database VACUUM in DB

贝镜
2023-12-01

HINT: To avoid a database shutdown, execute a full-database VACUUM in DB

这是数据库库龄超出阈值的一个提醒

      数据库的年轮值:
      select datname,age(datfrozenxid) from pg_database;

     数据库设置的阀值:
      select setting from pg_settings where name ='vacuum_freeze_min_age';

     临时文件的年轮值:
     select relname,age(relfrozenxid) from pg_class where relkind='r' order by 2 desc;

 

处理方式:

登录greenplum的master及各个segment实例,并执行vacuum freeze:

PGOPTIONS="-c gp_session_role=utility" psql -h xx -p xx -U xx -d DB;

DB#  vacuum freeze;

DB#  vacuum analyze;

 

 类似资料: