diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index ec0cdf4ed7..a3453b42cd 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -7256,7 +7256,8 @@ getOwnedSeqs(Archive *fout, TableInfo tblinfo[], int numTables) * Only dump identity sequences if we're going to dump the table that * it belongs to. */ - if (owning_tab->dobj.dump == DUMP_COMPONENT_NONE && + if ((owning_tab->dobj.dump == DUMP_COMPONENT_NONE || + !owning_tab->interesting) && seqinfo->is_identity_sequence) { seqinfo->dobj.dump = DUMP_COMPONENT_NONE;