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 1jktY0-0005So-1c for pgsql-general@arkaria.postgresql.org; Mon, 15 Jun 2020 18:09:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jktXy-0004dm-VV for pgsql-general@arkaria.postgresql.org; Mon, 15 Jun 2020 18:09:26 +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 1jktXy-0004dF-Nf for pgsql-general@lists.postgresql.org; Mon, 15 Jun 2020 18:09:26 +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 1jktXr-00037E-TV for pgsql-general@lists.postgresql.org; Mon, 15 Jun 2020 18:09:26 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jktXo-0005Ze-64; Mon, 15 Jun 2020 14:09:16 -0400 Date: Mon, 15 Jun 2020 14:09:16 -0400 From: Bruce Momjian To: Adrian Klaver Cc: Tanja Savic , "pgsql-general@lists.postgresql.org" Subject: Re: Move configuration files with pg_upgrade Message-ID: <20200615180916.GE12122@momjian.us> References: <0286cb3e-15bd-6577-ad13-bd0d21571565@aklaver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0286cb3e-15bd-6577-ad13-bd0d21571565@aklaver.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Jun 4, 2020 at 03:26:07PM -0700, Adrian Klaver wrote: > On 6/4/20 12:52 PM, Tanja Savic wrote: > > Hello, > > > > I did Postgresql upgrade from v10 to v12 using pg_upgrade (on Linux > > Ubuntu server). > > Of course i wanted settings inpg_hba.conf and postgresql.conf to keep, > > but after the upgrade there were new configuration files and I moved it > > manually. > > That is documented: > > https://www.postgresql.org/docs/12/pgupgrade.html > > " > 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. > " > > The new version's conf files will probably have new settings available so > this is something that should be reviewed before moving over. One way to > deal with this is include file(s): > > https://www.postgresql.org/docs/12/config-setting.html#CONFIG-INCLUDES > > Using them you create the settings you want to manage in the include file. > Then copy that over and set the include 'some_file' in the new > postgresql.conf and you are good. Yes, the community instructions require you to reconfigure the new server to match the old one. Some packagers who automate pg_upgrade might do that configuration migration automatically. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee