Skip to content
← Catalog atlas / pg_stat_autovacuum_scores

STATISTICS VIEW · 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.

First seen PG 19Last seen PG 19Columns 12

Checked column by column against a PostgreSQL 19beta3 instance · Raw measurement record ↗

Columns PostgreSQL 19

pg_stat_autovacuum_scores
COLUMNTYPEDESCRIPTION
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 booleanDocumented as: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 booleanDocumented as: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 booleanDocumented as:bool Whether autovacuum would vacuum the table for wraparound prevention.

Columns marked "implicit" are not included in SELECT *; some early statistics views are completed from same-version source, and the extra provenance is shown in the column description.

Column evolution matrix

Hover a cell for the column type
PresentAdded / type or attribute changeRemoved
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 is the coverage baseline; a column already present in the baseline is not marked as added. The matrix aligns columns by name, so a rename appears as the old column removed and a new column added.

Evolution timeline

Changes between adjacent majors

PostgreSQL 19 ← 18Catalog added

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

Compare any two versions

Pick two versions to see added, removed, and retyped columns. The interactive comparison needs JavaScript; the evolution timeline reads fine without it.