On Mon, Feb 12, 2018 at 10:07 AM, Alvaro Herrera
wrote:
> The followup question is what to do for multi-table stats objects. I
> think the options are that it should be dumped if:
>
> 1. any of its tables are dumped
> 2. *all* its tables are dumped
> 3. the schema containing the stats object is d
Alvaro Herrera writes:
> Tom Lane wrote:
>> I propose that we should just treat extended stats objects like other
>> generic database objects --- which, in practice, means "dump if the
>> containing schema is getting dumped". We don't exclude views or matviews
>> on the basis of whether their und
Thanks for patching. Your points #1, #2 and #4 are OK with me. I'm
thinking about point #3, concerning when-to-dump policy for stats
objects:
Tom Lane wrote:
> 3. pg_dump decides whether to dump a stats object on the basis of whether
> its underlying table is going to be dumped. While that's n
While poking around in pg_dump for another purpose, I happened to notice
these things about its handling of extended-statistics objects:
1. pg_dump supposes that a stats object must be in the same schema as
the table it's on. This is flat wrong.
regression=# create schema s1;
CREATE SCHEMA
regre