| From: | Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
| Cc: | Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Florian Helmberger <fh(at)25th-floor(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum |
| Date: | 2011-05-25 19:14:06 |
| Message-ID: | BANLkTinKDYoBo8ZpreagS3E5wkfL5zYNcg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin pgsql-hackers |
2011/5/25 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> Excerpts from Cédric Villemain's message of mié may 25 13:24:01 -0400 2011:
>
>> > Well, we only actually need to store one number, because you can figure
>> > out a much more precise number-of-pages figure with pg_relation_size()
>> > divided by configured page size.
>
>> I may miss something but we need relation size in costsize.c even if
>> we have a reldensity (or we need a reltuples). Else what values should
>> be used to estimate the relation size ? (pg_relation_size() goes down
>> to kernel/fs to ask the stat.st_size, is it really what we want?)
>
> Actually yes, the planner does go to kernel to determine the current
> relation size, and then multiplies by density as computed from catalog
> data to figure out current reasonably accurate number of tuples.
Okay! I just read that part. Interesting.
(If I dive correctly, we search our last segment and then use a
fileseek to the end of this segment to get our information)
make more sense, suddendly :)
>
> --
> Álvaro Herrera <alvherre(at)commandprompt(dot)com>
> The PostgreSQL Company - Command Prompt, Inc.
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
--
Cédric Villemain 2ndQuadrant
http://2ndQuadrant.fr/ PostgreSQL : Expertise, Formation et Support
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2011-05-25 21:54:30 | Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum |
| Previous Message | Marcelo Leite | 2011-05-25 17:44:23 | Re: How to remove conflicts when installing postgres where some other installation of postgres is already running using silent installer |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2011-05-25 19:14:43 | Re: use less space in xl_xact_commit patch |
| Previous Message | Robert Haas | 2011-05-25 19:13:44 | Re: use less space in xl_xact_commit patch |