I don't follow. We already have the tablenames, schemanames and oids of the to-be-dumped tables/indexes collected in pg_dump, all that's needed is to send a list of those to the server to filter there?
Do we have something that currently does that? All of the collect functions (collectComments, etc) take an unfiltered approach. Seems like we'd have to collect the stats sometime after ProcessArchiveRestoreOptions, which is significantly after the rest of them.
My concern is that it might prevent some upgrades from *ever* completing, because of pg_dump running out of memory.