Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rYWs6-00GQxe-N2 for pgsql-admin@arkaria.postgresql.org; Fri, 09 Feb 2024 19:49:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rYWs5-00Bml2-Kf for pgsql-admin@arkaria.postgresql.org; Fri, 09 Feb 2024 19:49:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rYWs5-00Bmjt-8g for pgsql-admin@lists.postgresql.org; Fri, 09 Feb 2024 19:49:13 +0000 Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rYWs2-005w6p-Sh for pgsql-admin@lists.postgresql.org; Fri, 09 Feb 2024 19:49:12 +0000 Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-42c44a3e49dso19472041cf.0 for ; Fri, 09 Feb 2024 11:49:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707508150; x=1708112950; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZwpfkcUbMJbv6rYsADsCg3KbSBzeLINNH+Dvm/6frJ8=; b=EYvomVplAJe7FeDDYur5uY0dC7cs7WI3Rqs0xGLO8zuSq1lBXOJ59/lLj6Rq8Ueuxy MXnXylQWo8HhMiF1B3oTkgAZohsosybZCzsO6SJD7FRCjJxitPVBVwifq2ZL4aCyaO3x 0m8a/xVlRWowG3/xtyGVNE5tYlG0T4cjyRkNCjtwZd9TtUwz41flrrsD0o/97QSigBQs 0TpJv5Ywm+62MGKGIKVDZAezccaMDnne+wwgTjBq9XoJ1jRu/oxi2oIndLop1XrphuB4 C2BKmu/pccybvO1G6RQegMZJE1nVWK2ANOJRtE3dCgIzgWP515YFq9iB3a2yhI/EnX+5 KDig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707508150; x=1708112950; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZwpfkcUbMJbv6rYsADsCg3KbSBzeLINNH+Dvm/6frJ8=; b=QQf7MAxn7vms4N0F5h4ygaUOOKfT5+KdMIrfo/6tn+/9NLFSXh5ENf1HdeoccndkuW hwqSTFm+SSPEGfjIRMO+9ID2cRbuoeW8KQkrJyJ5Y4MpfHInnJzJap8atp1BU3gIsDtA 3YmUSIej4Zspqw3CFuxKPrvufLWSg7TWIXvg74tbio2lmtkuOAtvnPeqtP0+6NVQ2MsQ qakfiH9jxUlf4Cz4Q04+u56kJ54pr0UDo66AkiOMZphmg4f1n4q0ddY4+E/RYWlJaKgY Qh3NqMJBDY/GdV//cA8gRGDkI7L2dLOmoYS3nNptsrhX+m7kpAEDCGe76HmRdroFasHF SPKA== X-Gm-Message-State: AOJu0Yx3whfwoBC953CYDcQNgAFqN8X4LTjzDKMTKhe4ZsPg1DOMvyld DYmV7pNZ4eimJ7NTU8F3xX/9CT/Rlpduei4jca1LH1RmrFlXYWrw X-Google-Smtp-Source: AGHT+IH4deaxWPotnEkhy7apmoUL/ttDL+5vkGILuLVH0++IJb75FY+b43HbCUQ4geostdway0sKfg== X-Received: by 2002:a05:622a:1789:b0:42c:3853:c58a with SMTP id s9-20020a05622a178900b0042c3853c58amr3201795qtk.25.1707508149624; Fri, 09 Feb 2024 11:49:09 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV39lxZJZ3WfROuG/5fWjwqhTRuOTqJE/D775Sid6P3+FHwoU/5dqTYeK0il+Bx37ilmlrAqAqBTF20AKWLuWpgZsHv0lD4 Received: from ?IPv6:2601:14b:4100:252f:557b:8a33:2f3f:6e2b? ([2601:14b:4100:252f:557b:8a33:2f3f:6e2b]) by smtp.gmail.com with ESMTPSA id y3-20020ac81283000000b0042c63c6200bsm99434qti.21.2024.02.09.11.49.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2024 11:49:09 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.7\)) Subject: Re: upgrade questions From: Ed Sabol In-Reply-To: Date: Fri, 9 Feb 2024 14:49:07 -0500 Cc: "pgsql-admin@lists.postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: To: David Barron X-Mailer: Apple Mail (2.3445.9.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Feb 9, 2024, at 12:00 PM, David Barron = wrote: > As the postgres user run these two commands > =20 > /usr/pgsql-15/bin/initdb -D /pgdata-system/15/data > /usr/pgsql-15/bin/pg_upgrade -b /usr/pgsql-11/bin -B /usr/pgsql-15/bin = -d /pgdata-system/11/data -D /pgdata-system/15/data I just went through this a few months ago myself, except I was coming = from 10.23. I'm not sure how large your database is, but, unless it's on the small = side, I recommend adding the command line switch `--link`. I think this = requires that /pgdata-system/11/data and /pgdata-system/15/data be on = the same volume. Also, if you have multiple CPUs or CPU cores, you can = add `--jobs=3D##` and it can do some of the stuff in parallel. These two = additions will speed up the upgrade drastically on large databases. I = also like to add the `-v` switch just so that you get some indication of = what pg_upgrade is doing. I recommend that you make sure your pg_hba.conf files in both = /pgdata-system/11/data and /pgdata-system/15/data are set to trust local = connections from the postgres account. Also, before you schedule your downtime for the upgrade, run your = pg_upgrade command with the `--check` argument. That will do a dry run = and let you know if you have any issues. Then you should resolve those = issues beforehand such that you can run the pg_upgrade command with = `--check` and not encounter any errors or warnings. That way, when it = comes time to perform the upgrade to your production system, you = shouldn't encounter any problems. I encountered issues with user roles and extensions. It's been a while, = but, IIRC, I think I had to change the ownership of some things and/or = install the extensions we use in the 15.x server before pg_upgrade would = run correctly. Good luck, Ed