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 1joTIq-0007Da-Ea for pgsql-committers@arkaria.postgresql.org; Thu, 25 Jun 2020 14:56:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1joTIp-0005rs-6u for pgsql-committers@arkaria.postgresql.org; Thu, 25 Jun 2020 14:56:35 +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 1joTIp-0005rl-1I for pgsql-committers@lists.postgresql.org; Thu, 25 Jun 2020 14:56:35 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joTIm-0003mf-9k; Thu, 25 Jun 2020 14:56:34 +0000 Received: from Davids-MacBook-Pro.local (c-68-33-74-93.hsd1.md.comcast.net [68.33.74.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 8C4AF54667; Thu, 25 Jun 2020 14:56:29 +0000 (UTC) Subject: Re: [COMMITTERS] pgsql: Mark pg_start_backup and pg_stop_backup as parallel-restricted. To: Magnus Hagander Cc: Tom Lane , Stephen Frost , Robert Haas , pgsql-committers References: <3542dfbd-68dd-f246-8fb5-d2ac25d947fc@pgmasters.net> <25505.1488831808@sss.pgh.pa.us> <20170306202815.GY9812@tamriel.snowman.net> <5633507a-3382-37aa-845a-3d0b4cdcd03a@pgmasters.net> <2235328.1593037629@sss.pgh.pa.us> <76e6afc0-1be4-c1bb-6f92-6eb6b7c5c1f2@pgmasters.net> From: David Steele Message-ID: Date: Thu, 25 Jun 2020 10:56:28 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 6/25/20 8:43 AM, Magnus Hagander wrote: > On Thu, Jun 25, 2020 at 2:11 PM David Steele > wrote: > On 6/24/20 6:27 PM, Tom Lane wrote: > > > > I was able to force it like this: > > > > regression=# set force_parallel_mode TO 'on'; > > SET > > Ah, yes, that works. Now at least I can test it. > > > It doesn't seem terribly likely that anybody would be using > > force_parallel_mode = on in production, but perhaps there's some > > reasonable combination of the other parallelization planning GUCs > > that can make this plan look attractive. > > I'll also ask the user if they have this GUC enabled. The user confirmed they are running with force_parallel_mode=on so that probably explains why we have never seen this in the field before. > Maybe have pgbackrest issue an explicit SET force_parallel_mode=off when > it runs against a 9.6? According to the documentation the way to disable parallelism is: set max_parallel_workers_per_gather = 0 So we added that to session initialization in pgBackRest: https://github.com/pgbackrest/pgbackrest/commit/ea04ec7b3f4c6cf25c1b827c25c6a3c5896159a8 I'm worried that (as Tom said) the planner might find another reason to choose a parallel query. I'm looking at this as more than a fix for 9.6. I can't see any reason for the backup control session to run queries in parallel and possibly use more resources, so parallelism is disabled for all versions that support it. Regards, -- -David david@pgmasters.net