On Sat, Nov 07, 2026 at 02:19:57PM +0000, PG Bug reporting form wrote:
> pg_dump now emits pg_restore_extended_stats() calls, but pg_ndistinct and
> pg_dependencies values, and the column order of MCV lists, are tied to
> attribute
> numbers. A plain dump does not preserve attribute numbers, so the restored
> stats
> can be lost or, worse, silently applied to the wrong columns.
That's a known thing. Being able to preserve logical order of
attributes across dump-restore is something that has been proposed in
the past, and not something that should be fixed here. This has been
mentioned previously, and this answer is the same one as I gave
previously.
--
Michael