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 1joQjX-0002Dz-5F for pgsql-committers@arkaria.postgresql.org; Thu, 25 Jun 2020 12:11:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1joQjU-0000p1-UP for pgsql-committers@arkaria.postgresql.org; Thu, 25 Jun 2020 12:11:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joQjU-0000ok-Oo for pgsql-committers@lists.postgresql.org; Thu, 25 Jun 2020 12:11:56 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1joQjP-00047S-Ll; Thu, 25 Jun 2020 12:11:55 +0000 Received: from Davids-MacBook-Pro.local (c-68-33-74-101.hsd1.md.comcast.net [68.33.74.101]) (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 40AA454670; Thu, 25 Jun 2020 12:11:50 +0000 (UTC) Subject: Re: [COMMITTERS] pgsql: Mark pg_start_backup and pg_stop_backup as parallel-restricted. To: Tom Lane Cc: Stephen Frost , Robert Haas , pgsql-committers@postgresql.org 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> From: David Steele Message-ID: <76e6afc0-1be4-c1bb-6f92-6eb6b7c5c1f2@pgmasters.net> Date: Thu, 25 Jun 2020 08:11:49 -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: <2235328.1593037629@sss.pgh.pa.us> 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/24/20 6:27 PM, Tom Lane wrote: > David Steele writes: >> ... So apparently it is possible. To get them working as soon as possible I >> recommended that they run: >> alter role postgres set max_parallel_workers_per_gather = 0; >> And that solved their problem. 9.6 is getting on in years so I'm not >> sure how much time/effort we want to spend on this, but I figured it was >> worth mentioning. > >> I did another round of trying to reproduce the issue but came up short a >> second time. > > 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. > I'm kind of inclined not to bother with a code fix at this late date, > given that we've had so few trouble reports. The right answer is > to tell anyone who's affected to fix their catalogs manually, viz > > update pg_proc set proparallel = 'r' where proname = 'pg_start_backup'; > update pg_proc set proparallel = 'r' where proname = 'pg_stop_backup'; Only pg_stop_backup() needs to be updated, but that's probably the best solution. > If we had back-patched 9fe3c644a (sans catversion bump of course) > at the time, then initdb's done with 9.6.3 or later would have gotten > this right. In hindsight, not doing that was clearly wrong. But it > seems a bit late to do it now. OK by me. Regards, -- -David david@pgmasters.net