Re: BUG #14438: Wrong row count in the join plan with unique index scan - Mailing list pgsql-bugs

From Nikitin Nikolay
Subject Re: BUG #14438: Wrong row count in the join plan with unique index scan
Date
Msg-id 9D7DC2CE9ACC4342AF7E7A88DDD0C9330193A137FD@v-maildb-02.infowatch.ru
Whole thread Raw
In response to Re: BUG #14438: Wrong row count in the join plan with unique index scan  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Thank you very much.

I see two commits:
Improve eqjoinsel_semi's behavior for small inner relat...
and=20
Fix bogus handling of JOIN_UNIQUE_OUTER/INNER cases...

But in the second fix parallel function is fixed.
Now we use the 9.4 postgres version in which there is no parallel select ex=
ecution.
Will these changes be in the following version 9.4.x?=20
Will they work effectively there?

Regards,
Nikolay.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20
Sent: Wednesday, November 30, 2016 2:08 AM
To: Nikitin Nikolay
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #14438: Wrong row count in the join plan with uniqu=
e index scan

nikolay.nikitin@infowatch.com writes:
> I execute select with "in" condition on the empty table.
> This select works with wrong plan.=20
> I think the wrong plan is chosen becose the postgres optimizer incorrectl=
y
> calculates row count in the right plan.

I've pushed a patch that should improve matters for such cases.
Thanks for the report!

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #14441: trim function bug (hit a keyword somewhere internally)
Next
From: josipa.milic@gmail.com
Date:
Subject: BUG #14442: serial maxvalue incorrect