Re: pg_upgrade does not upgrade pg_stat_statements properly

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Dave Cramer <davecramer(at)postgres(dot)rocks>
Cc: Jan Wieck <jan(at)wi3ck(dot)info>, Bruce Momjian <bruce(at)momjian(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-30 11:28:32
Message-ID: 20210730112832.wt3zdv32gllohope@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 30, 2021 at 07:18:56AM -0400, Dave Cramer wrote:
>
> So my understanding is that upgrade is going to run all of the SQL files
> from whatever version the original instance was up to the current version.
>
> I'm at a loss as to how this would not work ? How do you upgrade your
> extension otherwise ?

Yes, but as I said twice only if the currently installed version is different
from the default version. Otherwise ALTER EXTENSION UPGRADE is a no-op.

Just to be clear: I'm not arguing against automatically doing an ALTER
EXTENSION UPGRADE for all extensions in all databases during pg_upgrade (I'm
all for it), just that this specific corner case can't be solved by that
approach.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2021-07-30 11:33:55 Re: pg_upgrade does not upgrade pg_stat_statements properly
Previous Message Dave Cramer 2021-07-30 11:18:56 Re: pg_upgrade does not upgrade pg_stat_statements properly