Re: pg_upgrade does not upgrade pg_stat_statements properly

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Dave Cramer <davecramer(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly
Date: 2021-07-15 15:01:34
Message-ID: CAKFQuwZ7Cg3aD+oiBL7FE+F-tS_Bn5Lg4TqLpe-BxRoeazPS9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thursday, July 15, 2021, Dave Cramer <davecramer(at)gmail(dot)com> wrote:

>
> As a first step I propose the following
>
> diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.
> sgml
> index a83c63cd98..f747a4473a 100644
> --- a/doc/src/sgml/ref/pgupgrade.sgml
> +++ b/doc/src/sgml/ref/pgupgrade.sgml
> @@ -305,9 +305,10 @@ make prefix=/usr/local/pgsql.new install
> Install any custom shared object files (or DLLs) used by the old
> cluster
> into the new cluster, e.g., <filename>pgcrypto.so</filename>,
> whether they are from <filename>contrib</filename>
> - or some other source. Do not install the schema definitions, e.g.,
> - <command>CREATE EXTENSION pgcrypto</command>, because these will be
> upgraded
> - from the old cluster.
> + or some other source. Do not execute CREATE EXTENSION on the new
> cluster.
> + The extensions will be upgraded from the old cluster. However it may
> be
> + necessary to recreate the extension on the new server after the
> upgrade
> + to ensure compatibility with the new library.
> Also, any custom full text search files (dictionary, synonym,
> thesaurus, stop words) must also be copied to the new cluster.
> </para>
>
>

I think this needs some work to distinguish between core extensions where
we know the new server already has a library installed and external
extensions where it’s expected that the library that is added to the new
cluster is compatible with the version being migrated (not upgraded). In
short, it should never be necessary to recreate the extension. My
uncertainty revolves around core extensions since it seems odd to tell the
user to overwrite them with versions from an older version of PostgreSQL.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2021-07-15 15:09:28 Re: pg_upgrade does not upgrade pg_stat_statements properly
Previous Message Ronan Dunklau 2021-07-15 14:53:29 Re: [PATCH] Use optimized single-datum tuplesort in ExecSort