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 1hCsq5-0002CF-Sl for pgsql-general@arkaria.postgresql.org; Sat, 06 Apr 2019 21:27:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hCsq2-0002Fx-KC for pgsql-general@arkaria.postgresql.org; Sat, 06 Apr 2019 21:26:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCsq1-0002Fq-9y for pgsql-general@lists.postgresql.org; Sat, 06 Apr 2019 21:26:58 +0000 Received: from mail-oln040092006040.outbound.protection.outlook.com ([40.92.6.40] helo=NAM03-BY2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCspt-0003UA-0J for pgsql-general@lists.postgresql.org; Sat, 06 Apr 2019 21:26:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eXC5mM0fn4E1R7B29bV7Y2wnDQuy8WkZCe5b9HWNVnA=; b=MZVeN2R5oVnH1nSt9R3BiHYiszwvfxOchtRHlwAzcApF+Z1rzeBJhNskuDghuRsEtiM7NhU3Fj3TwZ9pEn8d61l3wYcbpFbkOZzOpx/y7xxlBkK+PEQ61wFu7twmNJIAOif7wAWTNDZ/SKyCqysGWUKRmbav0tVgVE4URUEJmM42dbHVOYy96AQpK8RT9AZle4io2gBe2jTxXXLko1a7aE0ZKLDmIqbACPPaJFcYeylD6xBguNgdIlLobsJXcubR+r7Nn5+rSuBLBarmtqzlZcTdYFwTU5d/YhJr3gXrT8gjo+McqBzxSd27cUVorCOLdU8z0o3o0wuIgfMIHi5SQg== Received: from BY2NAM03FT034.eop-NAM03.prod.protection.outlook.com (10.152.84.52) by BY2NAM03HT084.eop-NAM03.prod.protection.outlook.com (10.152.85.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.16; Sat, 6 Apr 2019 21:26:46 +0000 Received: from BYAPR01MB3701.prod.exchangelabs.com (10.152.84.60) by BY2NAM03FT034.mail.protection.outlook.com (10.152.84.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.16 via Frontend Transport; Sat, 6 Apr 2019 21:26:46 +0000 Received: from BYAPR01MB3701.prod.exchangelabs.com ([fe80::3c48:513d:60f7:6afc]) by BYAPR01MB3701.prod.exchangelabs.com ([fe80::3c48:513d:60f7:6afc%2]) with mapi id 15.20.1750.021; Sat, 6 Apr 2019 21:26:46 +0000 From: senor To: "pgsql-general@lists.postgresql.org" Subject: Re: pg_upgrade --jobs Thread-Topic: pg_upgrade --jobs Thread-Index: AQHU7KUEoYaMmqXr9EqkQgpkSWov1KYvnAIAgAAGP04= Date: Sat, 6 Apr 2019 21:26:46 +0000 Message-ID: References: ,<1c0469fb-1878-35ac-8468-78ce47299638@aklaver.com> In-Reply-To: <1c0469fb-1878-35ac-8468-78ce47299638@aklaver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:F3B8EECFA55D7687FD152E9F590A3FD8667AED8B9A43D2EA163C4A9F20BEFEA3;UpperCasedChecksum:FCF71BF8642CF5259A27989C3E03E55D8A0BDC9868222ADBF4CCBE406812F5F4;SizeAsReceived:6814;Count:44 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [KlUz+4Ncw6JElRrLu0G/riFx0Sn5DLC7] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031323274)(2017031324274)(2017031322404)(1601125500)(1603101475)(1701031045);SRVR:BY2NAM03HT084; x-ms-traffictypediagnostic: BY2NAM03HT084: x-microsoft-antispam-message-info: y5Q41AfM7fsQ1WsKQt+l22uOpI/oyCPPUbcKKU2FUY7ctiwrFeH2bcRgmF2/uwQR Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 45b160db-554b-466a-3784-08d6bad6929a X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Apr 2019 21:26:46.4311 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2NAM03HT084 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thank you for responding. I did see that note and should have included that= as part of my question. Since pg_upgrade is in control of how it is calling pg_dump, is there a rea= son pg_upgrade cannot use the directory output format when calling pg_dump?= Is the schema-only operation incompatible? ________________________________________ From: Adrian Klaver Sent: Saturday, April 6, 2019 1:52 PM To: senor; pgsql-general@lists.postgresql.org Subject: Re: pg_upgrade --jobs On 4/6/19 11:44 AM, senor wrote: > The pg_upgrade --jobs option is not passed as an argument when it calls p= g_dump. I haven't found anything in docs or forums mentioning a reason for = not supporting under certain circumstances other than possibly for pre-9.2.= The pg_upgrade docs page states that it allows multiple CPUs to be used fo= r dump and reload of schemas. Some databases I'm upgrading have 500,000+ ta= bles and running with a single process is greatly increasing the upgrade ti= me. > > I am also using the --link option. > I have tried "--jobs 20", "--jobs=3D20", placing this option first and la= st and many other variations. > I am upgrading 9.2.4 to 9.6.12 on CentOS 6. > Varying hardware but all with 32+ CPU cores. > > su - postgres -c "/usr/pgsql-9.6/bin/pg_upgrade --jobs=3D20 --link \ > --old-bindir=3D/usr/pgsql-9.2/bin/ \ > --new-bindir=3D/usr/pgsql-9.6/bin/ \ > --old-datadir=3D/var/lib/pgsql/9.2/data/ \ > --new-datadir=3D/var/lib/pgsql/9.6/data/" > > I feel like there's a simple reason I've missed but this seems pretty str= aight forward. https://www.postgresql.org/docs/9.6/app-pgdump.html "--jobs=3Dnjobs Run the dump in parallel by dumping njobs tables simultaneously. This option reduces the time of the dump but it also increases the load on the database server. You can only use this option with the directory ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ output format because this is the only output format where multiple ^^^^^^^^^^^^^ processes can write their data at the same time." > A secondary plan would be to find instructions for doing the same as "pg_= upgrade --link" manually so I can run "pg_dump --jobs 20". > Any assist is appreciated. > Thanks, > S. Cervesa > > -- Adrian Klaver adrian.klaver@aklaver.com