pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Steele <david@pgmasters.net>
To: Magnus Hagander <magnus@hagander.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Mark pg_start_backup and pg_stop_backup as parallel-restricted.
Date: Thu, 25 Jun 2020 10:56:28 -0400
Message-ID: <fd97933b-93cb-a4e0-92e4-bf22d82915fa@pgmasters.net> (raw)
In-Reply-To: <CABUevEzPYSC9Deveh6iFXJ9SAVgWX-7Kxi6gum2tDy32enB+ug@mail.gmail.com>
References: <E1ckwkQ-0006gp-Jo@gemulon.postgresql.org>
	<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>
	<CABUevEzPYSC9Deveh6iFXJ9SAVgWX-7Kxi6gum2tDy32enB+ug@mail.gmail.com>

On 6/25/20 8:43 AM, Magnus Hagander wrote:
> On Thu, Jun 25, 2020 at 2:11 PM David Steele <david@pgmasters.net 
> <mailto:david@pgmasters.net>> 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





view thread (13+ messages)  latest in thread

Message-ID: <fd97933b-93cb-a4e0-92e4-bf22d82915fa@pgmasters.net>
Permalink:  ../fd97933b-93cb-a4e0-92e4-bf22d82915fa@pgmasters.net/
Also on:    postgresql.org/message-id/fd97933b-93cb-a4e0-92e4-bf22d82915fa@pgmasters.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: david@pgmasters.net, magnus@hagander.net, tgl@sss.pgh.pa.us, sfrost@snowman.net, rhaas@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Mark pg_start_backup and pg_stop_backup as parallel-restricted.
  In-Reply-To: <fd97933b-93cb-a4e0-92e4-bf22d82915fa@pgmasters.net>
  References: <E1ckwkQ-0006gp-Jo@gemulon.postgresql.org> <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> <CABUevEzPYSC9Deveh6iFXJ9SAVgWX-7Kxi6gum2tDy32enB+ug@mail.gmail.com> <fd97933b-93cb-a4e0-92e4-bf22d82915fa@pgmasters.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox