Repository navigation
Add support for the ONLY option to VACUUM and ANALYZE in the Maintenance dialog. #9062 #9059 - #10838
Conversation
…nce dialog. pgadmin-org#9062 pgadmin-org#9059 On PostgreSQL 18 and later, an ONLY switch is shown for VACUUM and ANALYZE when the dialog is opened on a table, so that the parent table is processed without its inheritance children or partitions. Closes pgadmin-org#9062 Closes pgadmin-org#9059
|
No actionable comments were generated in the recent review. WalkthroughThe maintenance dialog adds an ONLY option for table-level VACUUM and ANALYZE on PostgreSQL 18 and later. SQL generation includes ONLY when the option and a table are set. Tests and documentation cover the option’s applicability and generated commands. ChangesMaintenance ONLY option
Estimated code review effort: 2 (Simple) | ~12 minutes Change: Feature Merge Risk:
|
The dialog files a selected partition's parent under 'table', so the command would be VACUUM/ANALYZE ONLY on the partitioned parent, which does nothing and skips the partition the user chose.
Summary
VACUUM (...) ONLY schema.table/ANALYZE (...) ONLY schema.tableso a parent table is processed without its inheritance children or partitions.min_version: 180000like the other version-specific options, and shown only when the dialog is opened on a table (hidden and cleared for databases, materialized views, REINDEX and CLUSTER). The template also emitsONLYonly when a table is the target.maintenance_dialog.rst.Note that PostgreSQL 18 accepts
VACUUM ONLYon a partitioned table but warns that it has no effect (a partitioned parent has no storage);ANALYZE ONLYthere collects the parent's statistics, which is the main use case.Test plan
regression/runtests.py --pkg tools.maintenance.tests.test_maintenance_create_job_unit_teston PostgreSQL 18 (new VACUUM ONLY / ANALYZE ONLY / ignored-without-table scenarios)maintenance.ui.spec.js(visibility, clearing and version gate of the new field), eslint on changed filesCloses #9062
Closes #9059
Summary by CodeRabbit