Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fpHDD-0005I8-C6 for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Aug 2018 18:05:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpHDB-00022z-LE for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Aug 2018 18:05:01 +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.89) (envelope-from ) id 1fpHDB-00022g-B3 for pgsql-bugs@lists.postgresql.org; Mon, 13 Aug 2018 18:05:01 +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.89) (envelope-from ) id 1fpHD4-00017Q-MV for pgsql-bugs@lists.postgresql.org; Mon, 13 Aug 2018 18:05:00 +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 w7DI4lxx022820; Mon, 13 Aug 2018 14:04:47 -0400 From: Tom Lane To: Pavel Stehule cc: Marko Tiikkaja , Andres Freund , andy@prestigedigital.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15324: Non-deterministic behaviour from parallelised sub-query In-reply-to: References: <153417684333.10284.11356259990921828616@wrigleys.postgresql.org> <20180813163518.gqvu2kqwr6uj75vj@alap3.anarazel.de> <21038.1534181205@sss.pgh.pa.us> Comments: In-reply-to Pavel Stehule message dated "Mon, 13 Aug 2018 19:47:37 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22818.1534183487.1@sss.pgh.pa.us> Date: Mon, 13 Aug 2018 14:04:47 -0400 Message-ID: <22819.1534183487@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Pavel Stehule writes: > 2018-08-13 19:26 GMT+02:00 Tom Lane : >> Likely, we need to treat the presence of a LIMIT/OFFSET in a sub-select >> as making it parallel-unsafe, for exactly the reason that that makes >> its results non-deterministic. > Isn't it default behave of LIMIT/OFFSET without ORDER BY clause? In principle, the planner could prove in some cases that the results were deterministic even with LIMIT/OFFSET. BuT I doubt it's worth the trouble. I certainly wouldn't advocate for such logic to be part of a back-patched bug fix. regards, tom lane