Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YCxzY-0007Jt-GZ for pgsql-bugs@arkaria.postgresql.org; Sun, 18 Jan 2015 22:06:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YCxzY-0000We-1n for pgsql-bugs@arkaria.postgresql.org; Sun, 18 Jan 2015 22:06:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YCxzX-0000WY-Fc for pgsql-bugs@postgresql.org; Sun, 18 Jan 2015 22:06:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YCxzU-0008AW-5P for pgsql-bugs@postgresql.org; Sun, 18 Jan 2015 22:06:42 +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 t0IM6bZs020685; Sun, 18 Jan 2015 17:06:37 -0500 From: Tom Lane To: t.katsumata1122@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12584: small bug about estimation of rows In-reply-to: <20150118033020.1991.7172@wrigleys.postgresql.org> References: <20150118033020.1991.7172@wrigleys.postgresql.org> Comments: In-reply-to t.katsumata1122@gmail.com message dated "Sun, 18 Jan 2015 03:30:20 +0000" Date: Sun, 18 Jan 2015 17:06:37 -0500 Message-ID: <20684.1421618797@sss.pgh.pa.us> X-Pg-Spam-Score: -1.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 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs