Index pg_constraint.confrelid to avoid seqscans
A new index on the pg_constraint catalog, over confrelid. Since NOT NULL constraints got their own row in that catalog, several operations scanned all of it and became slow; the commit message names pg_upgrade and ATTACH/DETACH PARTITION. The index avoids that scan.
- Author
- Manuel Reyes Bravo
- Reported-by
- Bernhard Wonisch, David Rowley
- Suggested-by
- Tom Lane
- Reviewed-by
- Álvaro Herrera
- Committer
- Álvaro Herrera
Files: src/include/catalog/pg_constraint.hsrc/backend/commands/tablecmds.csrc/backend/catalog/heap.csrc/include/catalog/catversion.h
b0496e30830