From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Sabino Mullane <htamfids(at)gmail(dot)com> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Stephen Frost <sfrost(at)snowman(dot)net>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, alvherre(at)alvh(dot)no-ip(dot)org, jian he <jian(dot)universality(at)gmail(dot)com> |
Subject: | Re: Statistics Import and Export |
Date: | 2025-05-22 19:41:07 |
Message-ID: | 1816936.1747942867@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Sabino Mullane <htamfids(at)gmail(dot)com> writes:
> On Thu, May 22, 2025 at 2:52 PM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
>> * The default for pg_restore is --no-statistics. That could cause a minor
>> surprise if the user specifies --with-statistics for pg_dump and
>> not for pg_restore.
> Hm...somewhat to my own surprise, I don't like this. If it's in the dump,
> restore it.
Yeah, I tend to lean that way too. If the user went out of their way
to say --with-statistics for pg_dump, how likely is it that they
don't want the statistics restored?
Another argument pointing in that direction is that the definition
Jeff proposes creates an inconsistency in the output between text
mode:
pg_dump --with-statistics ... | psql
and non-text mode:
pg_dump -Fc --with-statistics ... | pg_restore
There is no additional filter in text mode, so I think pg_restore's
default behavior should also be "no additional filter".
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2025-05-22 20:06:50 | Re: Assert("vacrel->eager_scan_remaining_successes > 0") |
Previous Message | Jeff Davis | 2025-05-22 19:38:50 | Re: Avoid orphaned objects dependencies, take 3 |