Re: pg_upgrade does not upgrade pg_stat_statements properly - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: pg_upgrade does not upgrade pg_stat_statements properly
Date
Msg-id CAKFQuwa55BPaoQcFyXwUMCoZUGY28AEvP8JKqmHCpCNzAxwP1w@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade does not upgrade pg_stat_statements properly  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_upgrade does not upgrade pg_stat_statements properly  (Dave Cramer <davecramer@gmail.com>)
Re: pg_upgrade does not upgrade pg_stat_statements properly  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Jul 29, 2021 at 9:34 AM Bruce Momjian <bruce@momjian.us> wrote:
On Thu, Jul 29, 2021 at 12:22:59PM -0400, Dave Cramer wrote:
> On Thu, 29 Jul 2021 at 12:16, Bruce Momjian <bruce@momjian.us> wrote:
>     Can you review the text I just posted?  Thanks.   I think we are making
>     progress.  ;-)
>
>
> I am OK with Everything except
>
> Do not load the schema definitions,
> e.g., <command>CREATE EXTENSION pgcrypto</command>, because these
> will be recreated from the old cluster.  (The extensions may be
> upgraded later using <literal>ALTER EXTENSION ... UPGRADE</literal>.)
>
>  I take issue with the word "recreated". This implies something new is created,
> when in fact the old definitions are simply copied over.
>
> As I said earlier; using the wording "may be upgraded" is not nearly cautionary
> enough.

OK, I changed it to "copy" though I used "recreated" earlier since I was
worried "copy" would be confused with file copy.  I changed the
recommendation to "should be".


I'm warming up to "should" but maybe add a "why" such as "the old versions are considered unsupported on the newer server".

I dislike "usually via operating system commands", just offload this to the extension, i.e., "must be installed in the new cluster via installation procedures specific to, and documented by, each extension (for contrib it is usually enough to ensure the -contrib package was chosen to be installed along with the -server package for your operating system.)"

I would simplify the first two sentences to just:

If the old cluster used extensions those same extensions must be installed in the new cluster via installation procedures specific to, and documented by, each extension.  For contrib extensions it is usually enough to install the -contrib package via the same method you used to install the PostgreSQL server.

I would consider my suggestion for "copy as-is/alter extension" wording in my previous email in lieu of the existing third and fourth sentences, with the "should" and "why" wording possibly worked in.  But the existing works ok.

David J.

pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly
Next
From: Fujii Masao
Date:
Subject: Re: Fix around conn_duration in pgbench