Jeff Davis <pgsql@j-davis.com> writes:
> Would it make sense to have a new SECTION_STATS?
Perhaps, but the implications for pg_dump's API would be nontrivial,
eg would we break any applications that know about the current
options for --section. And you still have to face up to the question
"does --data-only include this stuff?".
> Philosophically, I suppose stats are data, but I still don't understand
> why considering stats to be data is so important in pg_dump.
> Practically, I want to dump stats XOR data. That's because, if I dump
> the data, it's so costly to reload and rebuild indexes that it's not
> very important to avoid a re-ANALYZE.
Hmm, interesting point. But the counterargument to that is that
the cost of building indexes will also dwarf the cost of installing
stats, so why not do so? Loading data without stats, and hoping
that auto-analyze will catch up sooner not later, is exactly the
current behavior that we're doing all this work to get out of.
I don't really think we want it to continue to be the default.
regards, tom lane