Re: pg_upgrade analyze script - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pg_upgrade analyze script
Date
Msg-id CABUevEwbMoAe1X+9+1SsdjVzACkcsWWKC8X9_sQA-QWseCSa7w@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade analyze script  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_upgrade analyze script
List pgsql-hackers


On Tue, Oct 6, 2020 at 9:05 PM Bruce Momjian <bruce@momjian.us> wrote:
On Tue, Oct  6, 2020 at 11:43:01AM +0200, Magnus Hagander wrote:
> For a long time now, pg_upgrade drops a script (analyze_new_cluster.sh) that
> just calls vacuumdb to run the analyze in stages. This script made a lot of
> sense back when it actually implemented the stages, but these days since it's
> just calling a single command, I think it's just unnecessary complication.
>
> I suggest we drop it and just replace it with instructions to call vacuumdb
> directly.

Uh, that script has instructions on what is running.  Do we want to show
that at the end of running pg_upgrade or do people understand "stages"
by now?

I think that's information that belongs in the documentation, for those that case. I'm willing to bet that the large majority of the people who run the script never read that, and certainly don't cancel it. Those that need it to their upgrade planning long before they get to that stage.

It's already decently documented on the vacuumdb page.  Maybe just add a link to that from the pg_upgrade reference page (https://www.postgresql.org/docs/current/pgupgrade.html under point 14)?


> Attached patch does this. It also removes the support in the instructions that
> talk about pre-8.4 databases, which I believe is dead code per https://
> postgr.es/m/CABUevEx-D0PNVe00tkeQRGennZQwDtBJn=493MJt-x6sppbUxA@mail.gmail.com.

I just removed that.

Great, I'll simplify the patch if we agree that it's a good way forward, and also add a doc reference per above.
 
--

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add primary keys to system catalogs
Next
From: Magnus Hagander
Date:
Subject: Re: pg_upgrade dead code for pre-8.4 versions