pgsql: Avoid assuming that statistics for a parent relation reflect the

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid assuming that statistics for a parent relation reflect the
Date: 2006-05-02 04:34:25
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Avoid assuming that statistics for a parent relation reflect the properties of
the union of its child relations as well. This might have been a good idea
when it was originally coded, but it's a fatally bad idea when inheritance is
being used for partitioning. It's better to have no stats at all than
completely misleading stats. Per report from Mark Liberman.

The bug arguably exists all the way back, but I've only patched HEAD and 8.1
because we weren't particularly trying to support partitioning before 8.1.

Eventually we ought to look at deriving union statistics instead of just
punting, but for now the drop kick looks good.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/backend/optimizer/path:
allpaths.c (r1.137.2.2 -> r1.137.2.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/allpaths.c.diff?r1=1.137.2.2&r2=1.137.2.3)
pgsql/src/backend/utils/adt:
selfuncs.c (r1.191.2.1 -> r1.191.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c.diff?r1=1.191.2.1&r2=1.191.2.2)

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2006-05-02 11:18:08 pgsql: New Directory
Previous Message Tom Lane 2006-05-02 04:34:18 pgsql: Avoid assuming that statistics for a parent relation reflect the