Skip to content

Run VACUUM and ANALYZE as checks - #442

Merged
tamnd merged 2 commits into
mainfrom
vacuum
Oct 20, 2026
Merged

tamnd merged 2 commits into
mainfrom
vacuum

Conversation

@tamnd

@tamnd tamnd commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Summary

VACUUM and ANALYZE now run. rupg has no dead tuples to clean and no statistics to collect yet, so each statement does the checks of PostgreSQL and then ends. The checks are the options, the relations and the columns, and the result is the same errors, warnings and tags.

Changes

  • rupg-session parses the options as ExecVacuum does. This includes BUFFER_USAGE_LIMIT, PARALLEL and INDEX_CLEANUP, and the errors for the options that cannot be used together.
  • VACUUM cannot run in a transaction block, and it gives 25001 there. ANALYZE can run in a block.
  • rupg-analyze adds vacuum_relations, which follows expand_vacuum_rel and vacuum_rel. It looks up all the relations first. It then gives the warning "skipping ... cannot vacuum non-tables or special system tables" or "cannot analyze ..." for a relation of the wrong kind. It checks the column list as validate_va_cols_list does.
  • The extended protocol runs the statement too, with the same notices and positions.

Known differences

  • No statistics go into pg_statistic, and VACUUM frees no space.
  • VERBOSE gives no INFO output.
  • The permission check always passes, because rupg has one superuser role.

Tests

connection/vacuum.test is the output of PostgreSQL 19 for the same script in a new database. fmt, clippy, the workspace tests and the checks of xtask pass on server1.

@tamnd tamnd added kind/feature It does not do something that it must do. area/session Sessions, settings, pooling and the server runtime. area/sql The grammar, the lexer, the analyzer and the rewriter. labels Oct 20, 2026
@tamnd
tamnd merged commit 4fe0c82 into main Oct 20, 2026
5 checks passed
@tamnd
tamnd deleted the vacuum branch October 20, 2026 06:22
@tamnd tamnd mentioned this pull request Oct 20, 2026
1 of 17 tasks
tamnd added a commit that referenced this pull request Oct 20, 2026
* Add the changelog entry for #442

* Run CREATE TABLE AS and SELECT INTO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/session Sessions, settings, pooling and the server runtime. area/sql The grammar, the lexer, the analyzer and the rewriter. kind/feature It does not do something that it must do.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant