Re: pgstat_drop_relation bugfix

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: pgstat_drop_relation bugfix
Date: 2007-07-08 22:27:49
Message-ID: 17624.1183933669@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

I wrote:
> What I'm inclined to propose is that we just remove the
> pgstat_drop_relation() call from smgr_internal_unlink, and rely entirely
> on VACUUM to clean out dead entries in the pgstats data.

On checking the CVS history, that in fact is how the code worked before
8.1.3, when I introduced the bogus call in a fit of over-optimization :-(.
I vaguely recall thinking that the chance of losing data would be small
and pgstat is subject to losing data anyway. However, we are definitely
moving (slowly) in the direction of making pgstat more trustworthy, so
it's probably best not to take the risk of dropping useful stats.

Call removed from 8.1.x and up.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-07-08 22:49:14 Re: [GENERAL] Unable to get postgres running after long time no vacuum
Previous Message Tom Lane 2007-07-08 21:56:26 Re: BUG #3431: age() gets the days wrong

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-07-08 23:16:53 Re: Compile error with MSVC
Previous Message Tom Lane 2007-07-08 21:56:26 Re: BUG #3431: age() gets the days wrong