跳转到主要内容
← 目录图谱 / pg_stat_autovacuum_scores

STATISTICS VIEW · 统计视图

pg_stat_autovacuum_scores

The pg_stat_autovacuum_scores view will contain one row for each table in the current database (including TOAST tables), showing the current autovacuum scores for that specific table. Autovacuum prioritizes tables deemed eligible for processing based on their score, with higher scores indicating higher priority. See Section 24.1.6.1 for more information. While this view generates its results the same way that autovacuum workers do, it does so using the current source information, which might differ from the source information that an autovacuum worker sees when it gathers its list of tables to process. Therefore, this view is not a completely reliable indicator of which tables autovacuum will process and what order it will process them.

首次收录 PG 19最近收录 PG 19当前字段 12

已与 PostgreSQL 19beta3 实例逐字段核对 · 原始实测记录 ↗

字段结构 PostgreSQL 19

pg_stat_autovacuum_scores
字段 / COLUMN类型 / TYPE说明 / DESCRIPTION
relid oid Oid of the table.
schemaname name Name of the schema that the table is in.
relname name Name of the table.
score double precision Maximum value of all component scores. This is the value that autovacuum would use to sort the list of tables to process.
xid_score double precision Transaction ID age component score. Scores greater than autovacuum_freeze_score_weight indicate that autovacuum would vacuum the table for transaction ID wraparound prevention.
mxid_score double precision Multixact ID age component score. Scores greater than autovacuum_multixact_freeze_score_weight indicate that autovacuum would vacuum the table for multixact ID wraparound prevention.
vacuum_score double precision Vacuum component score. Scores greater than autovacuum_vacuum_score_weight indicate that autovacuum would vacuum the table (unless autovacuum is disabled).
vacuum_insert_score double precision Vacuum insert component score. Scores greater than autovacuum_vacuum_insert_score_weight indicate that autovacuum would vacuum the table (unless autovacuum is disabled).
analyze_score double precision Analyze component score. Scores greater than autovacuum_analyze_score_weight indicate that autovacuum would analyze the table (unless autovacuum is disabled).
do_vacuum boolean文档原写法:bool Whether autovacuum would vacuum the table. Note that even if the component scores indicate that autovacuum would vacuum the table, this may be false if autovacuum is disabled.
do_analyze boolean文档原写法:bool Whether autovacuum would analyze the table. Note that even if the component scores indicate that autovacuum would analyze the table, this may be false if autovacuum is disabled.
for_wraparound boolean文档原写法:bool Whether autovacuum would vacuum the table for wraparound prevention.

标记“隐式列”的字段不包含在 SELECT * 中;部分早期统计视图由同版本源码补全,额外来源会显示在字段说明中。

字段演化矩阵

悬停查看字段类型
存在新增 / 类型或属性变化移除
字段 / COLUMN9.09.19.29.39.49.59.610111213141516171819
relid
schemaname
relname
score
xid_score
mxid_score
vacuum_score
vacuum_insert_score
analyze_score
do_vacuum
do_analyze
for_wraparound

9.0 是收录基线;基线中已存在的字段不标记为新增。矩阵按字段名称对齐,重命名显示为旧字段移除与新字段新增。

演化时间线

相邻大版本的变化

PostgreSQL 19 ← 18新增目录

+ relid+ schemaname+ relname+ score+ xid_score+ mxid_score+ vacuum_score+ vacuum_insert_score+ analyze_score+ do_vacuum+ do_analyze+ for_wraparound

比较任意两个版本

选择两个版本,查看字段的新增、移除与类型变化。交互比较需要 JavaScript;演化时间线可直接阅读。