Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1csHXX-0000ci-MN for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Mar 2017 23:25:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1csHXX-00089I-9A for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Mar 2017 23:25:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1csHW1-0003Jx-4U for pgsql-hackers@postgresql.org; Sun, 26 Mar 2017 23:24:05 +0000 Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1csHVx-0002Yc-Qh for pgsql-hackers@postgresql.org; Sun, 26 Mar 2017 23:24:04 +0000 Received: by mail-wr0-x236.google.com with SMTP id w43so20796859wrb.0 for ; Sun, 26 Mar 2017 16:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=odMvhKwtStSNilUpc60eYjfJqbRZ1tzHIYQqliQ06Oc=; b=YqrmkMpE7YTvKePtYv8h/ITTmFWHd8nL+qRMQbFsUPBwb3QO1LnMf6SJOY6/T/+P53 eYVraHqh7fdTwIlqV5MmJBKqU5gCeE0t+coVfWvJS8di8no9nYJxw7Y5aXomDWb0NvNv +eOzzgbhVZYHuzR6x0kpxjIWMvwJsmWa0wlY3r58drBEYTSvZazhgNyp4rlcsSO4GqqI 3QMS9VBoRbdqg0hwN1uuAmEvNM69+reS6iGmJft17G9GYBZp+i9tIc1HXKJc0qQyFdFV 82hboUznvWD4+L/WBGPxCe/L1lv8SOQXGymou7w12Dn6bpQuH85P+4enC/YfqCMx9ADM bdXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=odMvhKwtStSNilUpc60eYjfJqbRZ1tzHIYQqliQ06Oc=; b=mK8G1Y49P7oGyPsK/AhVw5Y3XacDZhWXvBMYeyLQYx7EC8b4q87GFk+sHQNgzI80yR GEtDrHZ2xJOXBxuV+R1Z+eliZxHiK70GNHSqzhodmvoZv9xkP6f8o74xKFA7soUVkVd2 Jc1gGjcpVbeve9fmuky05goFEdlyNEEJNkMmxfj4z4vEGTb28GWeIZktNpAuWFzwMbkN whwLPMIjYqEnPBgHM7RqoGMb5bagKlEdXCRJQOtZHiqfjWAS7lM+8gdYcHEfXPpjymx6 u9xtH5ObGEVFkuyKkllfJ7acT9WyNNzUWKb7vU/ckZ/XZxZObP5I0lPn2cCpuEGHYQgc kSIw== X-Gm-Message-State: AFeK/H3+ue6WvEZKf4zWko/nmGlA+Orhn2lV2Ju+7CVg3+cPy1DYY5lti0dV3eCVXyO8tR48 X-Received: by 10.223.155.193 with SMTP id e1mr17942258wrc.86.1490570641018; Sun, 26 Mar 2017 16:24:01 -0700 (PDT) Received: from [10.137.2.17] (ip-89-177-46-65.net.upcbroadband.cz. [89.177.46.65]) by smtp.gmail.com with ESMTPSA id w2sm11986748wmd.19.2017.03.26.16.24.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Mar 2017 16:24:00 -0700 (PDT) Subject: Re: crashes due to setting max_parallel_workers=0 To: David Rowley , Rushabh Lathia References: <6ecd6f17-0dcf-1de7-ded8-0de7db1ddc88@2ndquadrant.com> Cc: PostgreSQL-development , Robert Haas From: Tomas Vondra Message-ID: Date: Mon, 27 Mar 2017 01:23:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 03/25/2017 02:01 PM, David Rowley wrote: > > I wondered if there's anything we can do here to better test cases > when no workers are able to try to ensure the parallel nodes work > correctly, but the more I think about it, the more I don't see wrong > with just using SET max_parallel_workers = 0; > It's demonstrably a valid way to disable parallel queries (i.e. there's nothing wrong with it), because the docs say this: Setting this value to 0 disables parallel query execution. > > My vote would be to leave the GUC behaviour as is and add some tests > to select_parallel.sql which exploit setting max_parallel_workers to 0 > for running some tests. > > If that's not going to fly, then unless we add something else to allow > us to reliably not get any workers, then we're closing to close the > door on being able to write automatic tests to capture this sort of > bug. > > ... thinks for a bit.... > > perhaps some magic value like -1 could be used for this... unsure of > how that would be documented though... > I agree it'd be very useful to have a more where we generate parallel plans but then prohibit starting any workers. That would detect this and similar issues, I think. I'm not sure we need to invent a new magic value, though. Can we simply look at force_parallel_mode, and if it's 'regress' then tread 0 differently? 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