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

Re: [COMMITTERS] pgsql: Clamp last_anl_tuples to n_live_tuples, in case we vacuum a table

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Clamp last_anl_tuples to n_live_tuples, in case we vacuum a table
Date: 2006-06-27 03:56:57
Message-ID: 20060627035657.GE467@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Alvaro Herrera wrote:

> Clamp last_anl_tuples to n_live_tuples, in case we vacuum a table without
> analyzing, so that future analyze threshold calculations don't get confused.
> Also, make sure we correctly track the decrease of live tuples cause by
> deletes.

Now that the values of n_live_tuples and n_dead_tuples are correct,
maybe we should expose them in functions like n_tuples_inserted and all
the rest?  Probably n_live_tuples is not as useful (because you can get
a very similar, if not equal, value from pg_class.reltuples), but
n_dead_tuples seems worthwhile.  I'd also add them to pg_stat_all_tables.

On a loosely related matter, how about changing pg_class.relpages to
pg_class.reldensity?  The idea being that instead of storing the number
of pages, we store the average tuple density, which is what we use
relpages for anyway.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-06-27 04:12:13
Subject: Re: [COMMITTERS] pgsql: Clamp last_anl_tuples to n_live_tuples, in case we vacuum a table
Previous:From: Bruce MomjianDate: 2006-06-27 03:53:38
Subject: Re: [COMMITTERS] pgsql: Disallow changing/dropping default expression

pgsql-committers by date

Next:From: Tom LaneDate: 2006-06-27 04:12:13
Subject: Re: [COMMITTERS] pgsql: Clamp last_anl_tuples to n_live_tuples, in case we vacuum a table
Previous:From: Bruce MomjianDate: 2006-06-27 03:53:38
Subject: Re: [COMMITTERS] pgsql: Disallow changing/dropping default expression

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