Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awIfI-0006I6-4E for pgsql-bugs@arkaria.postgresql.org; Sat, 30 Apr 2016 00:21:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1awIfH-0000bq-N0 for pgsql-bugs@arkaria.postgresql.org; Sat, 30 Apr 2016 00:21:43 +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 1awIee-0008EJ-IW for pgsql-bugs@postgresql.org; Sat, 30 Apr 2016 00:21:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1awIeb-0003vc-LZ for pgsql-bugs@postgresql.org; Sat, 30 Apr 2016 00:21:04 +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 u3U0KxIo005807; Fri, 29 Apr 2016 20:20:59 -0400 From: Tom Lane To: =?koi8-r?B?68nSy8/X08vJyiDhzMXL08HOxNI=?= cc: pgsql-bugs@postgresql.org Subject: Re: Bug report In-reply-to: <5721b901.52ad1c0a.c220c.1be4@mx.google.com> References: <5721b901.52ad1c0a.c220c.1be4@mx.google.com> Comments: In-reply-to =?koi8-r?B?68nSy8/X08vJyiDhzMXL08HOxNI=?= message dated "Thu, 28 Apr 2016 10:17:16 +0300" Date: Fri, 29 Apr 2016 20:20:59 -0400 Message-ID: <5806.1461975659@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org =?koi8-r?B?68nSy8/X08vJyiDhzMXL08HOxNI=?= writes: > I have a query (it is attached to the letter - bug.script), that do some > complex calculations using window functions. When the data is stored in > global tables it works just fine (returns 2711 rows), but when data is in > temporary tables the query returns 9076 (some rows are duplicated). I've pushed a fix for this. Many thanks for the reproducible test case! > I've checked, this bug is not reproduced in PostgreSQL 9.5.2, but I wonder > if it is coincidence, because the bug is pretty fragile (changing almost any > join leads to normal behavior), and in 9.5.2 the plan is totally different. Yeah, it was only accidentally masked in 9.5. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs