Bug report

Started by Кирковский Александрalmost 10 years ago2 messagesbugs
Jump to latest

Hi.

There is some pretty strange behavior in "PostgreSQL 9.4.5, compiled by
Visual C++ build 1800, 64-bit".

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 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.

I've also attached db backup (plain and tar), plans and non-default settings
in both postgresql versions.

Sincerely yours,

Alexander Kirkouski.

Attachments:

bug.scriptapplication/octet-stream; name=bug.scriptDownload
bugdb.backupapplication/octet-stream; name=bugdb.backupDownload
bugdbtar.backupapplication/octet-stream; name=bugdbtar.backupDownload
p952.settingsapplication/xml; name=p952.settingsDownload
p945.planapplication/octet-stream; name=p945.planDownload
p952.planapplication/octet-stream; name=p952.planDownload
p945.settingsapplication/xml; name=p945.settingsDownload
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Кирковский Александр (#1)
Re: Bug report

=?koi8-r?B?68nSy8/X08vJyiDhzMXL08HOxNI=?= <alex.kirkouski@gmail.com> 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