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 1m9EWk-00083q-T3 for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jul 2021 22:29:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m9EWj-0004ST-Pf for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jul 2021 22:29:17 +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 1m9EWj-0004SL-I7 for pgsql-hackers@lists.postgresql.org; Thu, 29 Jul 2021 22:29:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9EWh-0008H7-Gf for pgsql-hackers@lists.postgresql.org; Thu, 29 Jul 2021 22:29:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 16TMTB0t954341; Thu, 29 Jul 2021 18:29:11 -0400 From: Tom Lane To: Bruce Momjian cc: Dave Cramer , Alvaro Herrera , "David G. Johnston" , PostgreSQL Hackers Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly In-reply-to: <20210729222601.GX9600@momjian.us> References: <20210729163448.GP9600@momjian.us> <202107291743.pqlj3s2uilfu@alvherre.pgsql> <20210729190645.GS9600@momjian.us> <915981.1627592484@sss.pgh.pa.us> <20210729221103.GV9600@momjian.us> <953847.1627597196@sss.pgh.pa.us> <20210729222601.GX9600@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Thu, 29 Jul 2021 18:26:01 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <954339.1627597751.1@sss.pgh.pa.us> Date: Thu, 29 Jul 2021 18:29:11 -0400 Message-ID: <954340.1627597751@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian writes: > On Thu, Jul 29, 2021 at 06:19:56PM -0400, Tom Lane wrote: >> I suggested awhile ago that pg_upgrade should look into >> pg_available_extensions in the new cluster, and prepare >> a script with ALTER EXTENSION UPDATE commands for >> anything that's installed but is not the (new cluster's) >> default version. > I can do that, but I would think a pg_dump/restore would also have this > issue, so should this be more generic? No, because dump/restore does not have this issue. Regular pg_dump just issues "CREATE EXTENSION" commands, so you automatically get the target server's default version. regards, tom lane