Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crbBI-0001DJ-9d for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Mar 2017 02:11:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1crbBG-0004Sj-Sf for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Mar 2017 02:11:50 +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 1crbBF-0004SZ-TM for pgsql-hackers@postgresql.org; Sat, 25 Mar 2017 02:11:49 +0000 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1crbBC-0001Ya-Dm for pgsql-hackers@postgresql.org; Sat, 25 Mar 2017 02:11:49 +0000 Received: by mail-wr0-x230.google.com with SMTP id l43so3612976wre.1 for ; Fri, 24 Mar 2017 19:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version; bh=8X90+HqGeQEePnYt1hlpsbDVWP+mh7TV3aKU7h76Hj0=; b=c9swK/sxqxzETy2VY+CCc93f9dtRRxOJlgHIqBzi52QsraAExvDpS0YT6l9f+8nxwI Gy3nlMCwhng/AVQr/0cSFBFudXdBnYU11KPZIuLDWD0ttlxvOPbPB4ppKV8mvVfiQbGa R/MXl9R8cEAyxef9wVnxWKKfckfBZlwkt3ZEyU4H4tNQfdKoj++dmrOEVIdo/7FcLk+6 qfaL2WwHk94XMUTjqJIA9f1c56n1QmZUd40F8YsFKWrpUNjt8iel+I1H0VbC5FmLaeoF bLFKI/tMC5E6hbOLPX4m4kLw2dWTEsozS+2zlvutTQAxdEC5CX9LblqAWVmLSI7i9kbP FTAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version; bh=8X90+HqGeQEePnYt1hlpsbDVWP+mh7TV3aKU7h76Hj0=; b=hWexNWyo8D92JVqtw3wDITuV4APgqqxemxYfTajbAL/zQa3c0AOkIl/yTEj1YXmY53 zlrRfvaZ/rv4xfleTZ2VEphnvWV4DZNaofiOT8Tzsiclo+2MXoVssoqdQuFfeuTAWs5/ 3D7kZJoJjWvx0xaRx0ZvvBeegJhrkVdUhiqx9IrAVFavCAcPZQKly4Ay/pTi/lu+WucT AIIMwjRR5sNn0dFkn7s6eZ9f5Cbt0E45FaiVJFNH/oGhq9DSUoAhLyDRvkdvtxMeEHqE WdOk7gJsMK4a4b1AjQlMKR4Kg/pe02My485EqsNH4BrP0yV76NMj71Cw86QhZw2sdP0S hBqA== X-Gm-Message-State: AFeK/H2gs/QDlrp250rM9Lfk3SupXTpuJkpb+P4YXqxz3dUOJvHzvG6pbHjdjVUTm4d75Pk3 X-Received: by 10.223.151.138 with SMTP id s10mr1113170wrb.130.1490407905189; Fri, 24 Mar 2017 19:11:45 -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 190sm4627177wmk.17.2017.03.24.19.11.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 19:11:44 -0700 (PDT) To: PostgreSQL-development , Robert Haas From: Tomas Vondra Subject: crashes due to setting max_parallel_workers=0 Message-ID: <6ecd6f17-0dcf-1de7-ded8-0de7db1ddc88@2ndquadrant.com> Date: Sat, 25 Mar 2017 03:10:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------8C23F5BAEB87E63A720956BB" 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 This is a multi-part message in MIME format. --------------8C23F5BAEB87E63A720956BB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, while working on a patch I ran into some crashes that seem to be caused by inconsistent handling of max_parallel_workers - queries still seem to be planned with parallel plans enabled, but then crash at execution. The attached script reproduces the issue on a simple query, causing crashed in GatherMerge, but I assume the issue is more general. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services --------------8C23F5BAEB87E63A720956BB Content-Type: application/sql; name="crash-parallel.sql" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="crash-parallel.sql" RFJPUCBUQUJMRSBJRiBFWElTVFMgbmRpc3RpbmN0OwoKQ1JFQVRFIFRBQkxF IG5kaXN0aW5jdCAoCiAgICBmaWxsZXIxIFRFWFQsCiAgICBmaWxsZXIyIE5V TUVSSUMsCiAgICBhIElOVCwKICAgIGIgSU5ULAogICAgZmlsbGVyMyBEQVRF LAogICAgYyBJTlQsCiAgICBkIElOVAopOwoKLS0gcGVyZmVjdGx5IGNvcnJl bGF0ZWQgZ3JvdXBzIChsZWFkcyB0byB1bmRlci1lc3RpbWF0ZXMpCklOU0VS VCBJTlRPIG5kaXN0aW5jdCAoYSwgYiwgYywgZmlsbGVyMSkKICAgICBTRUxF Q1QgaS8xMCwgaS8xMCwgaS8xMCwgY2FzaF93b3JkcygoaS8xMCk6Om1vbmV5 KQogICAgICAgRlJPTSBnZW5lcmF0ZV9zZXJpZXMoMSwxMDAwMDApIHMoaSk7 CgpBTkFMWVpFIG5kaXN0aW5jdDsKClNFVCB3b3JrX21lbSA9ICc2NGtCJzsK U0VUIG1heF9wYXJhbGxlbF93b3JrZXJzID0gMDsKCkVYUExBSU4gU0VMRUNU IENPVU5UKCopIEZST00gbmRpc3RpbmN0IEdST1VQIEJZIGEsIGI7CgpTRUxF Q1QgQ09VTlQoKikgRlJPTSBuZGlzdGluY3QgR1JPVVAgQlkgYSwgYjsK --------------8C23F5BAEB87E63A720956BB Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --------------8C23F5BAEB87E63A720956BB--