Skip site navigation (1) Skip section navigation (2)

pgsql: Change planner to use the current true disk file size as its

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Change planner to use the current true disk file size as its
Date: 2004-12-01 19:00:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Log Message:
Change planner to use the current true disk file size as its estimate of
a relation's number of blocks, rather than the possibly-obsolete value
in pg_class.relpages.  Scale the value in pg_class.reltuples correspondingly
to arrive at a hopefully more accurate number of rows.  When pg_class
contains 0/0, estimate a tuple width from the column datatypes and divide
that into current file size to estimate number of rows.  This improved
methodology allows us to jettison the ancient hacks that put bogus default
values into pg_class when a table is first created.  Also, per a suggestion
from Simon, make VACUUM (but not VACUUM FULL or ANALYZE) adjust the value
it puts into pg_class.reltuples to try to represent the mean tuple density
instead of the minimal density that actually prevails just after VACUUM.
These changes alter the plans selected for certain regression tests, so
update the expected files accordingly.  (I removed join_1.out because
it's not clear if it still applies; we can add back any variant versions
as they are shown to be needed.)

Modified Files:
        catalogs.sgml (r2.92 -> r2.93)
        diskusage.sgml (r1.11 -> r1.12)
        perform.sgml (r1.47 -> r1.48)
        release.sgml (r1.314 -> r1.315)
        nbtree.c (r1.122 -> r1.123)
        heap.c (r1.276 -> r1.277)
        index.c (r1.241 -> r1.242)
        vacuum.c (r1.295 -> r1.296)
        vacuumlazy.c (r1.48 -> r1.49)
        plancat.c (r1.97 -> r1.98)
        relnode.c (r1.62 -> r1.63)
        genam.h (r1.45 -> r1.46)
        relation.h (r1.100 -> r1.101)
        case.out (r1.6 -> r1.7)
        inherit.out (r1.16 -> r1.17)
        join.out (r1.19 -> r1.20)
        polymorphism.out (r1.5 -> r1.6)

Removed Files:

pgsql-committers by date

Next:From: Tom LaneDate: 2004-12-01 19:32:14
Subject: pgsql: Clarify documentation of age() functions.
Previous:From: Bruce MomjianDate: 2004-12-01 17:39:20
Subject: pgsql: Add: > * Allow ecpg to work with MSVC and BCC

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group