diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 964823f5e67..c7a5abd5e4c 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -4534,6 +4534,7 @@ getIndexes(TableInfo tblinfo[], int numTables) "i.indexrelid = c.conindid AND " "c.contype IN ('p','u','x')) " "WHERE i.indrelid = '%u'::pg_catalog.oid " + "AND i.indisvalid " "ORDER BY indexname", tbinfo->dobj.catId.oid); } @@ -4562,6 +4563,7 @@ getIndexes(TableInfo tblinfo[], int numTables) "ON (d.refclassid = c.tableoid " "AND d.refobjid = c.oid) " "WHERE i.indrelid = '%u'::pg_catalog.oid " + "AND i.indisvalid " "ORDER BY indexname", tbinfo->dobj.catId.oid); }