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

From Bruce Momjian
Subject Re: pg_upgrade does not upgrade pg_stat_statements properly
Date
Msg-id 20210729154027.GK9600@momjian.us
Whole thread Raw
In response to Re: pg_upgrade does not upgrade pg_stat_statements properly  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
On Thu, Jul 29, 2021 at 08:28:12AM -0700, David G. Johnston wrote:
> On Thu, Jul 29, 2021 at 7:56 AM Bruce Momjian <bruce@momjian.us> wrote:
> 
>     On Wed, Jul 28, 2021 at 09:35:28PM -0700, David G. Johnston wrote:
>     > On Wed, Jul 28, 2021 at 6:52 PM Bruce Momjian <bruce@momjian.us> wrote:
>     >
>     >     I came up with the attached patch.
>     >
>     >
>     > Thank you.  It is an improvement but I think more could be done here (not
>     > exactly sure what - though removing the "copy binaries for contrib
>     modules from
>     > the old server" seems like a decent second step.)
> 
>     Uh, I don't see that text.
> """
>  5. Install custom shared object files
> 
> Install any custom shared object files (or DLLs) used by the old cluster into
> the new cluster, e.g., pgcrypto.so, whether they are from contrib or some other
> source. Do not install the schema definitions, e.g., CREATE EXTENSION pgcrypto,
> because these will be upgraded from the old cluster. Also, any custom full text
> search files (dictionary, synonym, thesaurus, stop words) must also be copied
> to the new cluster.
> """
> I have an issue with the fragment "whether they are from contrib" - my
> understanding at this point is that because of the way we package and version
> contrib it should not be necessary to copy those shared object files from the
> old to the new server (maybe, just maybe, with a qualification that you are
> upgrading between two versions that were in support during the same time
> period).

OK, so this is the confusion I was talking about.  You are supposed to
install _new_ _versions_ of the extensions that are in the old cluster
to the new cluster.  You are not supposed to _copy_ the files from the
old to new cluster.  I think my new patch makes that clearer, but can it
be improved?

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.




pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly
Next
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly