docs/reference/rules/ban-vacuum-full.md
Diagnostic Category: lint/safety/banVacuumFull
Since: vnext
[!NOTE] This rule is recommended. A diagnostic error will appear when linting your code.
Sources:
VACUUM FULL rewrites the entire table and acquires an ACCESS EXCLUSIVE lock.
This blocks all reads and writes for the duration of the operation, which can
take a very long time on large tables. Use regular VACUUM or pg_repack instead
for online table maintenance.
vacuum full my_table;
code-block.sql:1:1 lint/safety/banVacuumFull ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
× VACUUM FULL rewrites the entire table and blocks all access.
> 1 │ vacuum full my_table;
│ ^^^^^^^^^^^^^^^^^^^^^
2 │
i Use regular VACUUM or pg_repack for online table maintenance without blocking reads and writes.
vacuum my_table;
{
"linter": {
"rules": {
"safety": {
"banVacuumFull": "error"
}
}
}
}