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 1fgyZ4-0003uI-7h for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Jul 2018 20:33:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fgyZ2-0007vv-Il for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Jul 2018 20:33:16 +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 1fgyZ2-0007vo-9D for pgsql-bugs@lists.postgresql.org; Sat, 21 Jul 2018 20:33:16 +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 1fgyYv-00014o-MA for pgsql-bugs@postgresql.org; Sat, 21 Jul 2018 20:33:15 +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 w6LKX8xs017176; Sat, 21 Jul 2018 16:33:08 -0400 From: Tom Lane To: Dmitry Dolgov <9erthalion6@gmail.com> cc: PostgreSQL mailing lists Subject: Re: LLVM jit and window functions on a temporary table In-reply-to: References: Comments: In-reply-to Dmitry Dolgov <9erthalion6@gmail.com> message dated "Fri, 20 Jul 2018 23:28:06 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17174.1532205188.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 21 Jul 2018 16:33:08 -0400 Message-ID: <17175.1532205188@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dmitry Dolgov <9erthalion6@gmail.com> writes: > While testing PostgreSQL instance with enabled jit I found out another > interesting problem: > ... > gdb shows that in tuplestore_select_read_pointer somehow the value of pt= r is -1 Is that current HEAD, or back a bit? We just fixed a non-JIT-related bug with similar symptoms: Author: Tom Lane Branch: master [ff4f88916] 2018-07-11 12:07:20 -0400 Branch: REL_11_STABLE [8893d48e7] 2018-07-11 12:07:21 -0400 Fix bugs with degenerate window ORDER BY clauses in GROUPS/RANGE mode. and your query does look like it matches that, since the f1=3Df2 clause renders the ORDER BY degenerate. regards, tom lane