diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 8f9c4301912..390ce490c93 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -4028,6 +4028,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); } @@ -4056,6 +4057,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); }