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 1kAeAm-0001hd-8Q for pgsql-docs@arkaria.postgresql.org; Tue, 25 Aug 2020 18:59:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kAeAl-0007xt-3K for pgsql-docs@arkaria.postgresql.org; Tue, 25 Aug 2020 18:59:55 +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 1kAeAk-0007xl-TW for pgsql-docs@lists.postgresql.org; Tue, 25 Aug 2020 18:59:54 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAeAi-0006wE-EK for pgsql-docs@postgresql.org; Tue, 25 Aug 2020 18:59:54 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kAeAg-0002VT-UF; Tue, 25 Aug 2020 14:59:50 -0400 Date: Tue, 25 Aug 2020 14:59:50 -0400 From: Bruce Momjian To: Daniel Gustafsson Cc: Alvaro Herrera , PostgreSQL-documentation Subject: Re: ALTER SYSTEM between upgrades Message-ID: <20200825185950.GD26852@momjian.us> References: <20200707201821.GA24503@alvherre.pgsql> <20200713235849.GA32422@momjian.us> <08AD4526-75AB-457B-B2DD-099663F28040@yesql.se> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline In-Reply-To: <08AD4526-75AB-457B-B2DD-099663F28040@yesql.se> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 14, 2020 at 12:52:23PM +0200, Daniel Gustafsson wrote: > > On 14 Jul 2020, at 01:58, Bruce Momjian wrote: > > > I am creating a new thread to discuss the question raised by Alvaro of > > how many ALTER SYSTEM settings are lost during major upgrades. Do we > > properly document that users should migrate their postgresql.conf _and_ > > postgresql.auto.conf files during major upgrades? I personally never > > thought of this until now. > > Transferring postgresql.conf is discussed to some degree in the documentation > for pg_upgrade: > > 11. Restore pg_hba.conf > If you modified pg_hba.conf, restore its original settings. It might > also be necessary to adjust other configuration files in the new > cluster to match the old cluster, e.g. postgresql.conf. > > .. as well as upgrading via pg_dumpall: > > 4. Restore your previous pg_hba.conf and any postgresql.conf > modifications. > > One can argue whether those bulletpoints are sufficient for stressing the > importance, but it's at least mentioned. There is however no mention of > postgresql.auto.conf which clearly isn't helping anyone, so we should fix that. > > Taking that a step further, maybe we should mention additional config files > which could be included via include directives? There are tools out there who > avoid changing the users postgresql.conf by injecting an include directive > instead; they might've placed the included file alongside postgresql.conf. I have developed the attached pg_upgrade doc patch to address this. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee --5mCyUwZo2JvN/JJP Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="auto.diff" diff --git a/doc/src/sgml/ref/pgupgrade.sgml b/doc/src/sgml/ref/pgupgrade.sgml index 6779a5bddc..74f27130ec 100644 --- a/doc/src/sgml/ref/pgupgrade.sgml +++ b/doc/src/sgml/ref/pgupgrade.sgml @@ -516,9 +516,10 @@ pg_upgrade.exe Save any configuration files from the old standbys' configuration - directories you need to keep, e.g. postgresql.conf, - pg_hba.conf, because these will be overwritten or - removed in the next step. + directories you need to keep, e.g. postgresql.conf + (and any files included by it), postgresql.auto.conf, + pg_hba.conf, because these will be overwritten + or removed in the next step. @@ -606,7 +607,8 @@ rsync --archive --delete --hard-links --size-only --no-inc-recursive /vol1/pg_tb If you modified pg_hba.conf, restore its original settings. It might also be necessary to adjust other configuration files in the new - cluster to match the old cluster, e.g. postgresql.conf. + cluster to match the old cluster, e.g., postgresql.conf + (and any files included by it), postgresql.auto.conf. --5mCyUwZo2JvN/JJP--