pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: crashes due to setting max_parallel_workers=0
Date: Tue, 28 Mar 2017 06:21:13 +0200
Message-ID: <c8d0e9a7-77a9-a161-2ece-8cabea340612@2ndquadrant.com> (raw)
In-Reply-To: <CA+TgmoZXZZtxrS-x5UWuB0ghA3or-dT=mVqcvnf+HOoq5jHjCQ@mail.gmail.com>
References: <6ecd6f17-0dcf-1de7-ded8-0de7db1ddc88@2ndquadrant.com>
	<CAKJS1f-jnPUKyeF5OGJPNDtkkqMGUOcK+Yn6qjPzP4bTU04WXg@mail.gmail.com>
	<CAGPqQf2C6W8aNy9v9ZW2fJs+7p0MoBFfHEtXG8yypimGXTRUvw@mail.gmail.com>
	<CAKJS1f8x1ptsCidf2FpRXySUJfWLEMjSwxV8_kvozHFPQYaAow@mail.gmail.com>
	<b37482ff-6eac-ae1a-ea91-94e71247dce1@2ndquadrant.com>
	<CAGPqQf2RNNPfsOcK6Vb7bf+SifJU+yu_0yKuOnNHrzDQP-q1bA@mail.gmail.com>
	<e96d3112-26dd-d77d-7f8f-19b512ec4a02@2ndquadrant.com>
	<CAGPqQf2aGRD=Mx_8R7ZE7DV-nUE0gGoUX9qWJKxNZBmRR59n0w@mail.gmail.com>
	<CA+TgmoayHMRFG5Zk=-8RQvpDCkr-g6G5L_AB9gPRjW+BN+SihA@mail.gmail.com>
	<16476.1490622853@sss.pgh.pa.us>
	<CA+TgmoZXZZtxrS-x5UWuB0ghA3or-dT=mVqcvnf+HOoq5jHjCQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>



On 03/27/2017 05:51 PM, Robert Haas wrote:
> On Mon, Mar 27, 2017 at 9:54 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> On Mon, Mar 27, 2017 at 1:29 AM, Rushabh Lathia
>>> <rushabh.lathia@gmail.com> wrote:
>>>> But it seems a bit futile to produce the parallel plan in the first place,
>>>> because with max_parallel_workers=0 we can't possibly get any parallel
>>>> workers ever. I wonder why compute_parallel_worker() only looks at
>>>> max_parallel_workers_per_gather, i.e. why shouldn't it do:
>>>> parallel_workers = Min(parallel_workers, max_parallel_workers);
>>>> Perhaps this was discussed and is actually intentional, though.
>>
>>> It was intentional.  See the last paragraph of
>>> https://www.postgresql.org/message-id/CA%2BTgmoaMSn6a1780VutfsarCu0LCr%3DCO2yi4vLUo-JQbn4YuRA@mail.g...
>>
>> Since this has now come up twice, I suggest adding a comment there
>> that explains why we're intentionally ignoring max_parallel_workers.
> 
> Hey, imagine if the comments explained the logic behind the code!
> 
> Good idea.  How about the attached?
> 

Certainly an improvement. But perhaps we should also mention this at 
compute_parallel_worker, i.e. that not looking at max_parallel_workers 
is intentional.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (30+ messages)  latest in thread

Message-ID: <c8d0e9a7-77a9-a161-2ece-8cabea340612@2ndquadrant.com>
Permalink:  ../c8d0e9a7-77a9-a161-2ece-8cabea340612@2ndquadrant.com/
Also on:    postgresql.org/message-id/c8d0e9a7-77a9-a161-2ece-8cabea340612@2ndquadrant.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, rushabh.lathia@gmail.com, peter.eisentraut@2ndquadrant.com, david.rowley@2ndquadrant.com
  Subject: Re: crashes due to setting max_parallel_workers=0
  In-Reply-To: <c8d0e9a7-77a9-a161-2ece-8cabea340612@2ndquadrant.com>

* 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