From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Statistics Import and Export |
Date: | 2024-11-27 18:05:51 |
Message-ID: | 202411271805.vmm2bsgjqsm2@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2024-Nov-27, Tom Lane wrote:
> I do not like the idea of breaking existing upgrade scripts,
> especially not by requiring them to use a parameter that older
> vacuumdb versions will reject. That makes it impossible to have a
> script that is version independent. I really doubt that there is any
> usability improvement to be had here that's worth that.
I was only suggesting to break it because it was said upthread that that
was desirable behavior.
> How about causing "--analyze-in-stages" (as currently spelled) to
> be a no-op? We could keep the behavior available under some other
> name.
I think making it a no-op isn't useful, because people who run the old
scripts will get the behavior we do not want: clobber the statistics and
recompute them, losing the benefit that this feature brings.
On 2024-Nov-27, Bruce Momjian wrote:
> Uh, I guess we could do that, but we should emit something like
> "--analyze-in-stages option ignored".
I think emitting a message is not useful. It's quite possible that the
output of pg_upgrade will be redirected somewhere and this will go
unnoticed.
Maybe the most convenient for users is to keep "vacuumdb
--analyze-in-stages" doing exactly what we want to happen after
pg_upgrade, that is, in 18+, only recreate the missing stats. This is
because of what Corey said about messaging: many users are not going to
get our message that they need to adapt their scripts, so they won't.
Breaking the script would convey that message pretty quickly, but you're
right that it's not very convenient.
For people that want to use the old behavior of recomputing _all_
statistics not just the missing ones, we could add a different switch,
or an (optional) option to --analyze-in-stages.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2024-11-27 18:13:04 | Re: Statistics Import and Export |
Previous Message | Tom Lane | 2024-11-27 17:59:38 | Re: ECPG cleanup and fix for clang compile-time problem |