> Tom, >> Is anyone interested enough to try it if I code it?
> If you're patient for results, sure. I seem to be doing a customer > migration or upgrade every week now, so it wouldn't take me long to have > a test subject with a fairly complex database.
Here's a draft patch that does ordering using two lists, as I proposed. Please test to see if it's any faster or slower than the original logic.
Note: since this changes struct TocEntry, be sure to recompile all files in src/bin/pg_dump/ after patching.