Skip to content

Partitioning Tooling: Add helper for renaming indexes between tables

When partitioning tables, it will be a common requirement to make a table it's own first partition, and as part of that, we need to rename indexes after postgres automatically renames them.

We need a helper that can inspect the pg_indexes catalog, matching indexes by their definitions, between two tables, and fix their names.

Edited by Matt Kasa