Re: BUG #12584: small bug about estimation of rows - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #12584: small bug about estimation of rows
Date
Msg-id 20684.1421618797@sss.pgh.pa.us
Whole thread Raw
In response to BUG #12584: small bug about estimation of rows  (t.katsumata1122@gmail.com)
Responses Re: BUG #12584: small bug about estimation of rows  (Tomonari Katsumata <t.katsumata1122@gmail.com>)
List pgsql-bugs
t.katsumata1122@gmail.com writes:
> I found a bug about estimating rows without pg_class.reltuples.
> ...
> It should be using sizeof(ItemIdData) at line 512, so the estimated rows
> should be "rows=2260".
> I could understand ignoring alignment of data here from comment of the
> source code,
> but I couldn't find the reason of using sizeof(ItemPointerData) at this
> point.
> Usually this would not cause big problem, but it seems odd to me.
> Is there any reason to use sizeof(ItemPointerData) ?

You're absolutely right, that's a thinko.  Adjusted in HEAD.  I'm not
inclined to back-patch it though, since there's a risk of changing
plan choices which is something we don't like to do in stable branches
unless the planner is clearly doing the wrong thing.

            regards, tom lane

pgsql-bugs by date:

Previous
From: t.katsumata1122@gmail.com
Date:
Subject: BUG #12584: small bug about estimation of rows
Next
From: Tomonari Katsumata
Date:
Subject: Re: BUG #12584: small bug about estimation of rows