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 1l1bbW-0002sq-GB for pgsql-general@arkaria.postgresql.org; Mon, 18 Jan 2021 20:58:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1bbV-00014h-EP for pgsql-general@arkaria.postgresql.org; Mon, 18 Jan 2021 20:58:25 +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 1l1bbV-00014a-6f for pgsql-general@lists.postgresql.org; Mon, 18 Jan 2021 20:58:25 +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 1l1bbS-0005u5-NC for pgsql-general@lists.postgresql.org; Mon, 18 Jan 2021 20:58:24 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1l1bbQ-0001ml-Hb; Mon, 18 Jan 2021 15:58:20 -0500 Date: Mon, 18 Jan 2021 15:58:20 -0500 From: Bruce Momjian To: "W.P." Cc: pgsql-general@lists.postgresql.org Subject: Re: System (and DB) upgrade problem., "part 2" Message-ID: <20210118205820.GA29680@momjian.us> References: <60bec2fa-3411-e676-2012-45c26f40eab7@wp.pl> <6262bd4a-5d11-f0ec-0727-d6a0c10fb7f5@wp.pl> <2776d0f2865e954c938b68bf4bd15f81e5224668.camel@cybertec.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Jan 18, 2021 at 09:53:33PM +0100, W.P. wrote: > W dniu 18.01.2021 o 17:19, Laurenz Albe pisze: > > On Mon, 2021-01-18 at 05:33 +0100, W.P. wrote: > > > For 9.5 to 9.6 transition, it worked like charm. (except some problems > > > with parsing json data in a view, but this I will address later, after > > > upgrade to final version - Fedora 30, probably PG 10.x). > > > > > > Now I have problem with 9.6 -> 10.7 (Fedora 27 -> 28) upgrade. > > > As expected after system upgrade, database fails to start "files > > > incompatible with binaries". > > > > > > Found pg_upgrade, command line options "-b > > > /usr/lib/pgsql/postgresql-9.6/bin -B /usr/bin -d /var/lib/pgsql/data/" > > > BUT what should I put for option -D? ("new cluster data") Was > > > (directory) already created for me (during system upgrade), or have I to > > > create it somewhere (where? is best practice). > > > > > > There are NO logs for today trial to start in > > > /var/lib/pgsql/data/pg_log/. Where they could be? > > You would call "initdb" or "postgresql-10-setup" to create a new, empty > > cluster in version 10 and use that with -D. > Ok, so "step-by-step": > 1), I copy / move "somewhere" OLD DB files (*/pgsql/data/* for -d option), > 2). Do initdb / postgresql-10-setup to create NEW empty base (in > /var/lib/pgsql/ or somewhere, for -D option), > 3). do pg_upgrade. > > Is that correct? > > Is there somewhere "guide for 9.x -> 10.x CONCEPTS changes (and upgrade) > guide"? (clusters etc). The pg_upgade docs have all the steps. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee