On 2026-Sep-29, Manu wrote: > The third is the "maybe others": grepping Anum_pg_constraint_confrelid > turns up its else branch, which scans confrelid on SET UNLOGGED and > whose own comment already noted it had no usable index -- it does now. > The other two share CloneFkReferenced's shape, so they scan on confrelid > alone and filter contype in the loop.
Makes sense. Please create a commitfest entry for this, if there isn't one already. I think we should explore the idea of adding support for partial indexes on catalogs, though. Having an index 90% populated by useless entries doesn't sound like the best use of resources. Perhaps we could also use such functionality on ConstraintRelidTypidNameIndexId, splitting that into two indexes, one for constraints on types and another for indexes on relations, and avoid having to store InvalidOid on the other column. This doesn't have to delay this patch, however. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "La rebeldía es la virtud original del hombre" (Arthur Schopenhauer)
