Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csV6B-0006ce-Hw for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Mar 2017 13:54:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1csV6B-0005As-4m for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Mar 2017 13:54:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1csV69-00054X-77 for pgsql-hackers@postgresql.org; Mon, 27 Mar 2017 13:54:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1csV66-0004pw-UG for pgsql-hackers@postgresql.org; Mon, 27 Mar 2017 13:54:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v2RDsDlj016477; Mon, 27 Mar 2017 09:54:13 -0400 From: Tom Lane To: Robert Haas cc: Rushabh Lathia , Tomas Vondra , Peter Eisentraut , David Rowley , PostgreSQL-development Subject: Re: crashes due to setting max_parallel_workers=0 In-reply-to: References: <6ecd6f17-0dcf-1de7-ded8-0de7db1ddc88@2ndquadrant.com> Comments: In-reply-to Robert Haas message dated "Mon, 27 Mar 2017 07:59:27 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16475.1490622853.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 27 Mar 2017 09:54:13 -0400 Message-ID: <16476.1490622853@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > On Mon, Mar 27, 2017 at 1:29 AM, Rushabh Lathia > wrote: >> But it seems a bit futile to produce the parallel plan in the first plac= e, >> because with max_parallel_workers=3D0 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 =3D 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%3D= CO2yi4vLUo-JQbn4YuRA@mail.gmail.com Since this has now come up twice, I suggest adding a comment there that explains why we're intentionally ignoring max_parallel_workers. regards, tom lane --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers