Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXZkP-0002i9-P1 for pgsql-general@arkaria.postgresql.org; Sun, 02 Jun 2019 23:18:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hXZkO-0005Dz-Ea for pgsql-general@arkaria.postgresql.org; Sun, 02 Jun 2019 23:18:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXZkO-0005Dq-5K for pgsql-general@lists.postgresql.org; Sun, 02 Jun 2019 23:18:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hXZkG-0006by-Vr for pgsql-general@lists.postgresql.org; Sun, 02 Jun 2019 23:18:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x52NISBg026625; Sun, 2 Jun 2019 19:18:28 -0400 From: Tom Lane To: Zahir Lalani cc: "pgsql-general@lists.postgresql.org" Subject: Re: PG10 upgrade issue In-reply-to: References: Comments: In-reply-to Zahir Lalani message dated "Sun, 02 Jun 2019 23:10:05 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26623.1559517508.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 02 Jun 2019 19:18:28 -0400 Message-ID: <26624.1559517508@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Zahir Lalani writes: > We have done pg10 upgrades from 9.6 on all our environments successfully= . We have an automation script that does this for us. One environment is a= near replica of our production setup and all works fine. > We have now made 2 attempts at doing this on production - both ending up= with rollback > The key issue we have is that all queries were incredibly slow. The PG 1= 0 postmaster workers would all show 100% cpu, especially on the replicas. = We even increased CPUs but that made no difference. Did you make sure to rebuild statistics (re-ANALYZE) after the upgrade? pg_upgrade makes a script for that, but I don't believe it runs it for you. regards, tom lane