pg_upgrade does not upgrade pg_stat_statements properly

Started by Dave Crameralmost 5 years ago102 messageshackers
Jump to latest
#1Dave Cramer
pg@fastcrypt.com

Upgrading from
10.5 to 13.3 using pg_upgrade -k

The following is the result of an upgrade

select * from pg_extension ;
oid | extname | extowner | extnamespace | extrelocatable |
extversion | extconfig | extcondition
-------+--------------------+----------+--------------+----------------+------------+-----------+--------------
12910 | plpgsql | 10 | 11 | f |
1.0 | |
16403 | pg_stat_statements | 10 | 2200 | t |
1.5 | |
(2 rows)

test=# \df+ pg_stat_statements_reset

                  List of functions
 Schema |           Name           | Result data type | Argument data types
| Type | Volatility | Parallel | Owner | Security |     Access privileges
   | Language |       Source code        | Description
--------+--------------------------+------------------+---------------------+------+------------+----------+-------+----------+---------------------------+----------+--------------------------+-------------
 public | pg_stat_statements_reset | void             |
 | func | volatile   | safe     | davec | invoker  | davec=X/davec
  +| c        | pg_stat_statements_reset |
        |                          |                  |
 |      |            |          |       |          |
pg_read_all_stats=X/davec |          |                          |
(1 row)

And this is from creating the extension in a new db on the same instance

foo=# select * from pg_extension ;
oid | extname | extowner | extnamespace | extrelocatable |
extversion | extconfig | extcondition
-------+--------------------+----------+--------------+----------------+------------+-----------+--------------
12910 | plpgsql | 10 | 11 | f |
1.0 | |
16393 | pg_stat_statements | 10 | 2200 | t |
1.8 | |
(2 rows)

foo=# \df+ pg_stat_statements_reset

List of functions
Schema | Name | Result data type |
Argument data types | Type | Volatility |
Parallel | Owner | Security | Access privileges | Language | Source
code | Description
--------+--------------------------+------------------+--------------------------------------------------------------------+------+------------+----------+-------+----------+-------------------+----------+------------------------------+-------------
public | pg_stat_statements_reset | void | userid oid DEFAULT
0, dbid oid DEFAULT 0, queryid bigint DEFAULT 0 | func | volatile | safe
| davec | invoker | davec=X/davec | c |
pg_stat_statements_reset_1_7 |
(1 row)

Notice the upgraded version is 1.5 and the new version is 1.8

I would think somewhere in the upgrade of the schema there should have been
a create extension pg_stat_statements ?

Dave
Dave Cramer

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#1)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Wednesday, July 14, 2021, Dave Cramer <davecramer@gmail.com> wrote:

Notice the upgraded version is 1.5 and the new version is 1.8

I would think somewhere in the upgrade of the schema there should have
been a create extension pg_stat_statements ?

That would be a faulty assumption. Modules do not get upgraded during a
server version upgrade. This is a good thing, IMO.

David J.

#3Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#2)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Wed, 14 Jul 2021 at 14:47, David G. Johnston <david.g.johnston@gmail.com>
wrote:

On Wednesday, July 14, 2021, Dave Cramer <davecramer@gmail.com> wrote:

Notice the upgraded version is 1.5 and the new version is 1.8

I would think somewhere in the upgrade of the schema there should have
been a create extension pg_stat_statements ?

That would be a faulty assumption. Modules do not get upgraded during a
server version upgrade. This is a good thing, IMO.

This is from the documentation of pg_upgrade

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.

If indeed modules do not get upgraded then the above is confusing at best,
and misleading at worst.

Dave

Show quoted text

David J.

#4David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#3)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Wed, Jul 14, 2021 at 11:59 AM Dave Cramer <davecramer@gmail.com> wrote:

On Wed, 14 Jul 2021 at 14:47, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Wednesday, July 14, 2021, Dave Cramer <davecramer@gmail.com> wrote:

Notice the upgraded version is 1.5 and the new version is 1.8

I would think somewhere in the upgrade of the schema there should have
been a create extension pg_stat_statements ?

That would be a faulty assumption. Modules do not get upgraded during a
server version upgrade. This is a good thing, IMO.

This is from the documentation of pg_upgrade

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.

If indeed modules do not get upgraded then the above is confusing at best,
and misleading at worst.

"Install ... files used by the old cluster" (which must be binary
compatible with the new cluster as noted elsewhere on that page) supports
the claim that it is the old cluster's version that is going to result.
But I agree that saying "because these will be upgraded from the old
cluster" is poorly worded and should be fixed to be more precise here.

Something like, "... because the installed extensions will be copied from
the old cluster during the upgrade."

David J.

#5Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#4)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Wed, 14 Jul 2021 at 15:09, David G. Johnston <david.g.johnston@gmail.com>
wrote:

On Wed, Jul 14, 2021 at 11:59 AM Dave Cramer <davecramer@gmail.com> wrote:

On Wed, 14 Jul 2021 at 14:47, David G. Johnston <
david.g.johnston@gmail.com> wrote:

On Wednesday, July 14, 2021, Dave Cramer <davecramer@gmail.com> wrote:

Notice the upgraded version is 1.5 and the new version is 1.8

I would think somewhere in the upgrade of the schema there should have
been a create extension pg_stat_statements ?

That would be a faulty assumption. Modules do not get upgraded during a
server version upgrade. This is a good thing, IMO.

This is from the documentation of pg_upgrade

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.

If indeed modules do not get upgraded then the above is confusing at
best, and misleading at worst.

"Install ... files used by the old cluster" (which must be binary
compatible with the new cluster as noted elsewhere on that page) supports
the claim that it is the old cluster's version that is going to result.
But I agree that saying "because these will be upgraded from the old
cluster" is poorly worded and should be fixed to be more precise here.

Something like, "... because the installed extensions will be copied from
the old cluster during the upgrade."

This is still rather opaque. Without intimate knowledge of what changes
have occurred in each extension I have installed; how would I know what I
have to fix after the upgrade.

Seems to me extensions should either store some information in pg_extension
to indicate compatibility, or they should have some sort of upgrade script
which pg_upgrade would call to fix any problems (yes, I realize this is
hand waving at the moment)

In this example the older version of pg_stat_statements works fine, it only
fails when I do a dump restore of the new database and then the error is
rather obtuse. IIRC pg_dump wanted to revoke all from public from the
function pg_stat_statements_reset() and that could not be found, yet the
function is there. I don't believe we should be surprising our users like
this.

Dave

Show quoted text

David J.

#6David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#5)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Wed, Jul 14, 2021 at 12:21 PM Dave Cramer <davecramer@gmail.com> wrote:

On Wed, 14 Jul 2021 at 15:09, David G. Johnston <
david.g.johnston@gmail.com> wrote:

Something like, "... because the installed extensions will be copied from
the old cluster during the upgrade."

This is still rather opaque. Without intimate knowledge of what changes
have occurred in each extension I have installed; how would I know what I
have to fix after the upgrade.

The point of this behavior is that you don't have to fix anything after an
upgrade - so long as your current extension version works on the new
cluster. If you are upgrading in such a way that the current extension and
new cluster are not compatible you need to not do that. Upgrade instead to
a lesser version where they are compatible. Then upgrade your extension to
its newer version, changing any required user code that such an upgrade
requires, then upgrade the server again.

David J.

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dave Cramer (#5)
Re: pg_upgrade does not upgrade pg_stat_statements properly

Dave Cramer <davecramer@gmail.com> writes:

On Wed, 14 Jul 2021 at 15:09, David G. Johnston <david.g.johnston@gmail.com>
wrote:

"Install ... files used by the old cluster" (which must be binary
compatible with the new cluster as noted elsewhere on that page) supports
the claim that it is the old cluster's version that is going to result.
But I agree that saying "because these will be upgraded from the old
cluster" is poorly worded and should be fixed to be more precise here.

Something like, "... because the installed extensions will be copied from
the old cluster during the upgrade."

This is still rather opaque. Without intimate knowledge of what changes
have occurred in each extension I have installed; how would I know what I
have to fix after the upgrade.

That's exactly why we don't force upgrades of extensions. It is on the
user's head to upgrade their extensions from time to time, but we don't
make them do it as part of pg_upgrade. (There are also some
implementation-level reasons to avoid this, IIRC, but the overall
choice is intentional.)

I agree this documentation could be worded better. Another idea
is that possibly pg_upgrade could produce a list of extensions
that are not the latest version, so people know what's left to
be addressed.

regards, tom lane

#8Dave Cramer
pg@fastcrypt.com
In reply to: Tom Lane (#7)
Re: pg_upgrade does not upgrade pg_stat_statements properly

Dave Cramer

On Wed, 14 Jul 2021 at 15:43, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Dave Cramer <davecramer@gmail.com> writes:

On Wed, 14 Jul 2021 at 15:09, David G. Johnston <

david.g.johnston@gmail.com>

wrote:

"Install ... files used by the old cluster" (which must be binary
compatible with the new cluster as noted elsewhere on that page)

supports

the claim that it is the old cluster's version that is going to result.
But I agree that saying "because these will be upgraded from the old
cluster" is poorly worded and should be fixed to be more precise here.

Something like, "... because the installed extensions will be copied

from

the old cluster during the upgrade."

This is still rather opaque. Without intimate knowledge of what changes
have occurred in each extension I have installed; how would I know what I
have to fix after the upgrade.

That's exactly why we don't force upgrades of extensions. It is on the
user's head to upgrade their extensions from time to time, but we don't
make them do it as part of pg_upgrade. (There are also some
implementation-level reasons to avoid this, IIRC, but the overall
choice is intentional.)

I agree this documentation could be worded better.

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>

Another idea
is that possibly pg_upgrade could produce a list of extensions
that are not the latest version, so people know what's left to
be addressed.

It would be possible to look at the control files in the new cluster to see
the default version and simply output a file with the differences.
We can query pg_extension for the currently installed versions.

Dave

Show quoted text
#9David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#8)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thursday, July 15, 2021, Dave Cramer <davecramer@gmail.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.

#10Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#9)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thu, 15 Jul 2021 at 11:01, David G. Johnston <david.g.johnston@gmail.com>
wrote:

On Thursday, July 15, 2021, Dave Cramer <davecramer@gmail.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.

Well clearly my suggestion was not clear if you interpreted that as over
writing them with versions from an older version of PostgreSQL.

Dave Cramer

Show quoted text
#11David G. Johnston
david.g.johnston@gmail.com
In reply to: David G. Johnston (#9)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thursday, July 15, 2021, David G. Johnston <david.g.johnston@gmail.com>
wrote:

On Thursday, July 15, 2021, Dave Cramer <davecramer@gmail.com> wrote:

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.
However it may be
+     necessary to recreate the extension on the new server after the
upgrade
+     to ensure compatibility with the new library.

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.

Ok. Just re-read the docs a third time…no uncertainty regarding contrib
now…following the first part of the instructions means that before one
could re-run create extension they would need to restore the original
contrib library files to avoid the new extension code using the old
library. So that whole part about recreation is inconsistent with the
existing unchanged text.

David J.

#12David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#10)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thursday, July 15, 2021, Dave Cramer <davecramer@gmail.com> wrote:

Well clearly my suggestion was not clear if you interpreted that as over
writing them with versions from an older version of PostgreSQL.

Ignoring my original interpretation as being moot; the section immediately
preceding your edit says to do exactly that.

David J.

#13Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#11)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thu, 15 Jul 2021 at 11:15, David G. Johnston <david.g.johnston@gmail.com>
wrote:

On Thursday, July 15, 2021, David G. Johnston <david.g.johnston@gmail.com>
wrote:

On Thursday, July 15, 2021, Dave Cramer <davecramer@gmail.com> wrote:

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.
However it may be
+     necessary to recreate the extension on the new server after the
upgrade
+     to ensure compatibility with the new library.

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.

Ok. Just re-read the docs a third time…no uncertainty regarding contrib
now…following the first part of the instructions means that before one
could re-run create extension they would need to restore the original
contrib library files to avoid the new extension code using the old
library. So that whole part about recreation is inconsistent with the
existing unchanged text.

The way I solved the original problem of having old function definitions
for pg_stat_statement functions in the *new* library was by recreating the
extension which presumably redefines the functions correctly.

I'm thinking at this point we need something a bit more sophisticated like

ALTER EXTENSION ... UPGRADE. And the extension knows how to upgrade itself.

Dave

Show quoted text
#14David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#13)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thursday, July 15, 2021, Dave Cramer <davecramer@gmail.com> wrote:

I'm thinking at this point we need something a bit more sophisticated like

ALTER EXTENSION ... UPGRADE. And the extension knows how to upgrade itself.

I’m not familiar with what hoops extensions jump through to facilitate
upgrades but even if it was as simple as “create extension upgrade” I
wouldn’t have pg_upgrade execute that command (or at least not by
default). I would maybe have pg_upgrade help move the libraries over from
the old server (and we must be dealing with different databases having
different extension versions in some manner…).

David J.

#15Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#14)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thu, 15 Jul 2021 at 11:29, David G. Johnston <david.g.johnston@gmail.com>
wrote:

On Thursday, July 15, 2021, Dave Cramer <davecramer@gmail.com> wrote:

I'm thinking at this point we need something a bit more sophisticated like

ALTER EXTENSION ... UPGRADE. And the extension knows how to upgrade
itself.

I’m not familiar with what hoops extensions jump through to facilitate
upgrades but even if it was as simple as “create extension upgrade” I
wouldn’t have pg_upgrade execute that command (or at least not by
default). I would maybe have pg_upgrade help move the libraries over from
the old server (and we must be dealing with different databases having
different extension versions in some manner…).

Well IMHO the status quo is terrible. Perhaps you have a suggestion on how
to make it better ?

Dave

Show quoted text

David J.

#16Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Dave Cramer (#15)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On 2021-Jul-15, Dave Cramer wrote:

Well IMHO the status quo is terrible. Perhaps you have a suggestion on how
to make it better ?

I thought the suggestion of having pg_upgrade emit a file with a list of
all extensions needing upgrade in each database was a fairly decent one.

--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/

#17Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Alvaro Herrera (#16)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On 2021-Jul-15, Alvaro Herrera wrote:

On 2021-Jul-15, Dave Cramer wrote:

Well IMHO the status quo is terrible. Perhaps you have a suggestion on how
to make it better ?

I thought the suggestion of having pg_upgrade emit a file with a list of
all extensions needing upgrade in each database was a fairly decent one.

Eh, and
pg_upgrade [other switches] --upgrade-extensions
sounds good too ...

--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/

#18David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#15)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thu, Jul 15, 2021 at 8:43 AM Dave Cramer <davecramer@gmail.com> wrote:

On Thu, 15 Jul 2021 at 11:29, David G. Johnston <
david.g.johnston@gmail.com> wrote:

I’m not familiar with what hoops extensions jump through to facilitate
upgrades but even if it was as simple as “create extension upgrade” I
wouldn’t have pg_upgrade execute that command (or at least not by
default). I would maybe have pg_upgrade help move the libraries over from
the old server (and we must be dealing with different databases having
different extension versions in some manner…).

Well IMHO the status quo is terrible. Perhaps you have a suggestion on how
to make it better ?

To a certain extent it is beyond pg_upgrade's purview to care about
extension explicitly - it considers them "data" on the database side and
copies over the schema and, within reason, punts on the filesystem by
saying "ensure that the existing versions of your extensions in the old
cluster can correctly run in the new cluster" (which basically just takes a
simple file copy/install and the assumption you are upgrading to a server
version that is supported by the extension in question - also a reasonable
requirement). In short, I don't have a suggestion on how to improve that
and don't really consider it a terrible flaw in pg_upgrade.

I'll readily admit that I lack sufficient knowledge here to make such
suggestions as I don't hold any optionions that things are "quite terrible"
and haven't been presented with concrete problems to consider alternatives
for.

David J.

#19Dave Cramer
pg@fastcrypt.com
In reply to: Alvaro Herrera (#17)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thu, 15 Jul 2021 at 12:13, Alvaro Herrera <alvherre@alvh.no-ip.org>
wrote:

On 2021-Jul-15, Alvaro Herrera wrote:

On 2021-Jul-15, Dave Cramer wrote:

Well IMHO the status quo is terrible. Perhaps you have a suggestion on

how

to make it better ?

I thought the suggestion of having pg_upgrade emit a file with a list of
all extensions needing upgrade in each database was a fairly decent one.

I think this is the minimum we should be doing.

Eh, and
pg_upgrade [other switches] --upgrade-extensions
sounds good too ...

Ultimately I believe this is the solution, however we still need to teach
extensions how to upgrade themselves or emit a message saying they can't,
or even ignore if it truly is a NOP.

Dave

#20David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#19)
Re: pg_upgrade does not upgrade pg_stat_statements properly

On Thu, Jul 15, 2021 at 9:16 AM Dave Cramer <davecramer@gmail.com> wrote:

Eh, and

pg_upgrade [other switches] --upgrade-extensions
sounds good too ...

Ultimately I believe this is the solution, however we still need to teach
extensions how to upgrade themselves or emit a message saying they can't,
or even ignore if it truly is a NOP.

If it's opt-in and simple I don't really care but I doubt I would use it as
personally I'd rather the upgrade not touch my application at all (to the
extent possible) and just basically promise that I'll get a reliable
upgrade. Then I'll go ahead and ensure I have the backups of the new
version and that my application works correctly, then just run the "ALTER
EXTENSION" myself. But anything that will solve pain points for
same-PostgreSQL-version extension upgrading is great.

I would say that it probably should be "--upgrade-extension=aaa
--upgrade_extension=bbb" though if we are going to the effort to offer
something.

David J.

#21Robert Eckhardt
eckhardtr@vmware.com
In reply to: David G. Johnston (#18)
#22Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#20)
#23Jan Wieck
JanWieck@Yahoo.com
In reply to: David G. Johnston (#20)
#24Jan Wieck
JanWieck@Yahoo.com
In reply to: Robert Eckhardt (#21)
#25David G. Johnston
david.g.johnston@gmail.com
In reply to: Jan Wieck (#23)
#26Jan Wieck
JanWieck@Yahoo.com
In reply to: David G. Johnston (#25)
#27David G. Johnston
david.g.johnston@gmail.com
In reply to: Jan Wieck (#26)
#28Jan Wieck
JanWieck@Yahoo.com
In reply to: David G. Johnston (#27)
#29Bruce Momjian
bruce@momjian.us
In reply to: Jan Wieck (#28)
#30David G. Johnston
david.g.johnston@gmail.com
In reply to: Jan Wieck (#28)
#31Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#30)
#32David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#31)
#33Jan Wieck
JanWieck@Yahoo.com
In reply to: David G. Johnston (#32)
#34David G. Johnston
david.g.johnston@gmail.com
In reply to: Jan Wieck (#33)
#35Bruce Momjian
bruce@momjian.us
In reply to: David G. Johnston (#11)
#36David G. Johnston
david.g.johnston@gmail.com
In reply to: Bruce Momjian (#35)
#37Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#36)
#38Bruce Momjian
bruce@momjian.us
In reply to: David G. Johnston (#36)
#39Dave Cramer
pg@fastcrypt.com
In reply to: Bruce Momjian (#38)
#40Bruce Momjian
bruce@momjian.us
In reply to: Dave Cramer (#39)
#41Dave Cramer
pg@fastcrypt.com
In reply to: Bruce Momjian (#40)
#42Bruce Momjian
bruce@momjian.us
In reply to: Dave Cramer (#41)
#43David G. Johnston
david.g.johnston@gmail.com
In reply to: Bruce Momjian (#38)
#44Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#43)
#45David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#44)
#46Bruce Momjian
bruce@momjian.us
In reply to: David G. Johnston (#43)
#47Bruce Momjian
bruce@momjian.us
In reply to: Dave Cramer (#44)
#48Jan Wieck
JanWieck@Yahoo.com
In reply to: Bruce Momjian (#40)
#49Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#45)
#50David G. Johnston
david.g.johnston@gmail.com
In reply to: Bruce Momjian (#47)
#51Bruce Momjian
bruce@momjian.us
In reply to: David G. Johnston (#45)
#52Bruce Momjian
bruce@momjian.us
In reply to: Jan Wieck (#48)
#53Bruce Momjian
bruce@momjian.us
In reply to: David G. Johnston (#50)
#54Dave Cramer
pg@fastcrypt.com
In reply to: Bruce Momjian (#53)
#55Jan Wieck
JanWieck@Yahoo.com
In reply to: David G. Johnston (#50)
#56Bruce Momjian
bruce@momjian.us
In reply to: Dave Cramer (#54)
#57David G. Johnston
david.g.johnston@gmail.com
In reply to: Jan Wieck (#55)
#58Jan Wieck
JanWieck@Yahoo.com
In reply to: David G. Johnston (#57)
#59David G. Johnston
david.g.johnston@gmail.com
In reply to: Bruce Momjian (#56)
#60David G. Johnston
david.g.johnston@gmail.com
In reply to: Jan Wieck (#58)
#61Dave Cramer
pg@fastcrypt.com
In reply to: David G. Johnston (#59)
#62Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Dave Cramer (#61)
#63Dave Cramer
pg@fastcrypt.com
In reply to: Alvaro Herrera (#62)
#64Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Bruce Momjian (#56)
#65Julien Rouhaud
rjuju123@gmail.com
In reply to: Bruce Momjian (#52)
#66Dave Cramer
pg@fastcrypt.com
In reply to: Alvaro Herrera (#64)
#67Jan Wieck
JanWieck@Yahoo.com
In reply to: Julien Rouhaud (#65)
#68Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Dave Cramer (#66)
#69Bruce Momjian
bruce@momjian.us
In reply to: David G. Johnston (#59)
#70Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#69)
#71David G. Johnston
david.g.johnston@gmail.com
In reply to: Bruce Momjian (#69)
#72David G. Johnston
david.g.johnston@gmail.com
In reply to: Bruce Momjian (#70)
#73Bruce Momjian
bruce@momjian.us
In reply to: Alvaro Herrera (#64)
#74Bruce Momjian
bruce@momjian.us
In reply to: Alvaro Herrera (#68)
#75Dave Cramer
pg@fastcrypt.com
In reply to: Bruce Momjian (#73)
#76David G. Johnston
david.g.johnston@gmail.com
In reply to: Dave Cramer (#75)
#77Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dave Cramer (#75)
#78Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#77)
#79Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#78)
#80Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#79)
#81Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#80)
#82Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#81)
#83Dave Cramer
pg@fastcrypt.com
In reply to: Bruce Momjian (#82)
#84Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Bruce Momjian (#82)
#85Julien Rouhaud
rjuju123@gmail.com
In reply to: Jan Wieck (#67)
#86Dave Cramer
pg@fastcrypt.com
In reply to: Julien Rouhaud (#85)
#87Julien Rouhaud
rjuju123@gmail.com
In reply to: Dave Cramer (#86)
#88Dave Cramer
pg@fastcrypt.com
In reply to: Julien Rouhaud (#87)
#89Julien Rouhaud
rjuju123@gmail.com
In reply to: Dave Cramer (#88)
#90Dave Cramer
pg@fastcrypt.com
In reply to: Julien Rouhaud (#89)
#91Julien Rouhaud
rjuju123@gmail.com
In reply to: Dave Cramer (#90)
#92Dave Cramer
pg@fastcrypt.com
In reply to: Julien Rouhaud (#91)
#93Julien Rouhaud
rjuju123@gmail.com
In reply to: Dave Cramer (#92)
#94Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#79)
#95Jan Wieck
JanWieck@Yahoo.com
In reply to: Dave Cramer (#92)
#96Jan Wieck
JanWieck@Yahoo.com
In reply to: Julien Rouhaud (#93)
#97Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jan Wieck (#95)
#98Jan Wieck
JanWieck@Yahoo.com
In reply to: Tom Lane (#97)
#99Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#73)
#100Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#94)
#101Justin Pryzby
pryzby@telsasoft.com
In reply to: Bruce Momjian (#100)
#102Bruce Momjian
bruce@momjian.us
In reply to: Justin Pryzby (#101)