Repository navigation
Run Maintenance on the selected partition rather than its parent table. #10895 - #10900
Conversation
pgadmin-org#10895 The Maintenance dialog filled in the table name from the parent table when a partition was selected, and the schema from the schema node the partition is listed under, so VACUUM, ANALYZE, REINDEX and CLUSTER processed the parent (and, without ONLY, the whole hierarchy). It now targets the partition in its own schema, which also fixes an index or constraint on a partition that lives in a different schema from its parent. With partitions targeted correctly, the PostgreSQL 18 ONLY switch is shown for them again; it is meaningful for a partition that is itself partitioned. Closes pgadmin-org#10895
|
No actionable comments were generated in the recent review. WalkthroughMaintenance now builds job parameters from the selected partition when applicable, including its schema. The ONLY option is available for table and partition selections for VACUUM and ANALYZE. Documentation and regression tests cover these changes. ChangesPartition Maintenance
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Possibly related PRs
Merge Risk:
|
Summary
VACUUM (VERBOSE) public.parent;for bothpublic.childandother.child2. It now uses the partition and its own schema (schema_namefrom its node data). That also fixes an index or constraint on a partition in a different schema from its parent, where the partition is filed undertablein the tree hierarchy.setExtraParametersintomaintenance_utils.jsso it can be unit tested.Test plan
schema: public, table: parentfor both partitions. After the fix:public.child,other.child2, andother/child2_id_idxfor an index onchild2; ONLY shown.VACUUM (VERBOSE) ONLY other.child2andANALYZE ONLY public.childrun cleanly on PostgreSQL 18.regression/javascript/maintenance/maintenance_utils_spec.js(4 of its 7 cases fail against the old logic) and the updated ONLY cases inmaintenance.ui.spec.js: 17 passed. ESLint clean on the changed files.Closes #10895
Summary by CodeRabbit