On Fri, 2024-03-15 at 03:55 -0400, Corey Huinker wrote: > > Statistics are preserved by default, but this can be disabled with > the option --no-statistics. This follows the prevailing option > pattern in pg_dump, etc.
I'm not sure if saving statistics should be the default in 17. I'm inclined to make it opt-in. > There are currently several failing TAP tests around > pg_dump/pg_restore/pg_upgrade. It is a permissions problem. When user running pg_dump is not the superuser, they don't have permission to access pg_statistic. That causes an error in exportRelationStatsStmt(), which returns NULL, and then the caller segfaults. > I'm looking at those, but in the mean timeĀ I'm seeking feedback on > the progress so far. Still looking, but one quick comment is that the third argument of dumpRelationStats() should be const, which eliminates a warning. Regards, Jeff Davis