Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9Qh7-0001w6-48 for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Jul 2021 11:28:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m9Qh6-0004XI-3H for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Jul 2021 11:28:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9Qh5-0004XA-QM for pgsql-hackers@lists.postgresql.org; Fri, 30 Jul 2021 11:28:47 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m9Qh1-0006Zm-9l for pgsql-hackers@lists.postgresql.org; Fri, 30 Jul 2021 11:28:45 +0000 Received: by mail-pj1-x102f.google.com with SMTP id nh14so2970172pjb.2 for ; Fri, 30 Jul 2021 04:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=99gE5GlLUGfM7u6+TtlGkB0lL4PnsJa1CUYfVVX156k=; b=fszVKRdJ+47Nz39Jm8AIzvypXxfvOd3Wk9TdKjoBUSjnnTel4RMjmzBLpggNCaE1c8 6vQA20jsAoUiY0ASBa9oduDO4PKwMlzFrcXaSYMfu8R4zzB8UakF15kTeDam6k3yj7BS 2MjgFy1l36SSoh2VE2QYMfdK6h8ZBlncBJxZFRPxReRTpW7NuWIttL6JFje32J4n6vlL KjOrz35zZ3WW3qyjXmZVPKrwHJ32s+IxieN6kXZOXzdEw9p5tRcFDRDjMGJGftmACxe0 XnLO140yEI/mZyCTPich7weWzhrNPuRPGxlxHnJDpde0yRvXxEZh3+pX/iV+J1dRiPRr jSyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=99gE5GlLUGfM7u6+TtlGkB0lL4PnsJa1CUYfVVX156k=; b=F0N962S521g9TNlgw/uLQiU0IVlc+qGwlHBS5rRt6xc6e0eOElYnpGj4tyj9oejDEB dxRm/l4sgESOINHGS52BMK4xbUmODm7d0XyKWsP4aHWz0rZDgvh2O+syW/OK+lkXA9F3 3Sq2C1wyNXqRxK4XOOUYTpQpdACbKhhoCp/w9vjQoSx8QJwYSVGhUf3V5I8ux9GMb10F +0ORKeC71jWAb/s2xYFqeD1uW5LREZNXn7g5mtQi0b5NZ5KQYV3430FiwPAJbFvrDR96 SP3c/QM0G0n+cMR84rbN6NXoZM/qtMuUCUVdfmoS6NlV5r+HKomEnYqSiTfEDS6FA5jz I3uw== X-Gm-Message-State: AOAM531NKlgdZLbfTS6V6QB8oJrq6CgldZYNRyxEmr7BTa9MOQ9VamT7 dg7/30EQbWGU2k1evn7cRX8= X-Google-Smtp-Source: ABdhPJz0vp3NR8lz1pe14COBP1n0xxV/CQD3hsBdHR3b1XB6GRPNYYcVHZhTvXaYCZNRGeQtD25kHg== X-Received: by 2002:a17:90b:3144:: with SMTP id ip4mr2852990pjb.4.1627644520763; Fri, 30 Jul 2021 04:28:40 -0700 (PDT) Received: from nol (2001-b011-0001-1ee1-3704-47f4-8ef2-c9c1.dynamic-ip6.hinet.net. [2001:b011:1:1ee1:3704:47f4:8ef2:c9c1]) by smtp.gmail.com with ESMTPSA id m6sm1947637pfc.151.2021.07.30.04.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 04:28:39 -0700 (PDT) Date: Fri, 30 Jul 2021 19:28:32 +0800 From: Julien Rouhaud To: Dave Cramer Cc: Jan Wieck , Bruce Momjian , PostgreSQL Hackers Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly Message-ID: <20210730112832.wt3zdv32gllohope@nol> References: <20210729161432.GN9600@momjian.us> <20210730020257.jpvunvworyqsaz43@nol> <20210730103945.nc2zl74v5czy2qwd@nol> <20210730110728.tqt3oeohyvtuqqk7@nol> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.