Re: pgstat_drop_relation bugfix - Mailing list pgsql-patches

From Tom Lane
Subject Re: pgstat_drop_relation bugfix
Date
Msg-id 17624.1183933669@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgstat_drop_relation bugfix  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgstat_drop_relation bugfix  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
List 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

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: dblink connection security
Next
From: Alvaro Herrera
Date:
Subject: Re: Compile error with MSVC