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 1m9A43-0006D7-KY for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jul 2021 17:43:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m9A42-0007lK-5p for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jul 2021 17:43:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9A41-0007lB-U8 for pgsql-hackers@lists.postgresql.org; Thu, 29 Jul 2021 17:43:21 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9A3v-00036u-Ii for pgsql-hackers@lists.postgresql.org; Thu, 29 Jul 2021 17:43:20 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id C17685C010D; Thu, 29 Jul 2021 13:43:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 29 Jul 2021 13:43:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=bELv937ETBHYq1QLIZKWiMjeKi10pajujJGfI+k4gRs=; b=Ywu2ai2Q SqjVNucQUUL9LC0EM1wvGtRWSdzVsezRbQAtKe8I7yXXbRSXPOrAYjUgCX+QUKTA Nm6xh9t1q0Zj5cEIyttOuLZZA+2jm2GObaHjmUuUtmRilV8ExvAqwVgnEnVirC5G HdYx2xtQiyBxDb27VhAn4TIJRGm1mdlgK5iGnT7SkW/05NBusL0urZdBqRtWjFqo JyNSaAas47pfN6vNhgFUjXQVH1oPSKmWjvJYbsUpqwrisMwku10aMPz8Oljn3qSm qk03oyc5gJNKYyGNKifamNP9/OyWy6S2679YLuFEQwdSQI8rNKStA5F29Y7GrMKL hjsaLV/NepjAyg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrheefgdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepvedvueegfffgjeelffeugeefkeeuieefhffhueduheejieff hfdvieffjeejgfevnecuffhomhgrihhnpehpghgtrhihphhtohdrshhopdgvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Jul 2021 13:43:13 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id AC46A2A09BD; Thu, 29 Jul 2021 13:43:09 -0400 (-04) Date: Thu, 29 Jul 2021 13:43:09 -0400 From: Alvaro Herrera To: Bruce Momjian Cc: Dave Cramer , "David G. Johnston" , Tom Lane , PostgreSQL Hackers Subject: Re: pg_upgrade does not upgrade pg_stat_statements properly Message-ID: <202107291743.pqlj3s2uilfu@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210729163448.GP9600@momjian.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-29, Bruce Momjian wrote: > + If the old cluster used extensions, whether from > + contrib or some other source, it used > + shared object files (or DLLs) to implement these extensions, e.g., > + pgcrypto.so. Now, shared object files matching > + the new server binary must be installed in the new cluster, usually > + via operating system commands. Do not load the schema definitions, > + e.g., CREATE EXTENSION pgcrypto, because these > + will be copied from the old cluster. (Extensions should be upgraded > + later using ALTER EXTENSION ... UPGRADE.) I propose this: If the old cluster used shared-object files (or DLLs) for extensions or other loadable modules, install recompiled versions of those files onto the new cluster. Do not install the extension themselves (i.e., do not run CREATE EXTENSION), because extension definitions will be carried forward from the old cluster. Extensions can be upgraded after pg_upgrade completes using ALTER EXTENSION ... UPGRADE, on a per-database basis. I suggest " ... for extensions or other loadable modules" because loadable modules aren't necessarily for extensions. Also, it's perfectly possible to have extension that don't have a loadable module. I suggest "extension definitions ... carried forward" instead of "extensions ... copied" (your proposed text) to avoid the idea that files are copied; use it instead of "schema definitions ... upgraded" (the current docs) to avoid the idea that they are actually upgraded; also, "schema definition" seems a misleading term to use here. I suggest "can be upgraded" rather than "should be upgraded" because we're not making a recommendation, merely stating the fact that it is possible to do so. I suggest using the imperative mood, to be consistent with the surrounding text. (Applies to the first para; the second para is informative.) I haven't seen it mentioned in the thread, but I think the final phrase of this should be a separate step, Copy custom full-text search files Copy any custom full text search file (dictionary, synonym, thesaurus, stop word list) to the new server. While this is closely related to extensions, it's completely different. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "Sallah, I said NO camels! That's FIVE camels; can't you count?" (Indiana Jones)