Re: DROP TABLE and autovacuum
| От | ITAGAKI Takahiro |
|---|---|
| Тема | Re: DROP TABLE and autovacuum |
| Дата | |
| Msg-id | 20070621115823.6E6B.ITAGAKI.TAKAHIRO@oss.ntt.co.jp обсуждение исходный текст |
| Ответ на | Re: DROP TABLE and autovacuum (Alvaro Herrera <alvherre@commandprompt.com>) |
| Ответы |
pgstat_drop_relation bugfix
|
| Список | pgsql-hackers |
Alvaro Herrera <alvherre@commandprompt.com> wrote:
> Something worth considering, though unrelated to the topic at hand: what
> happens with the table stats after CLUSTER? Should we cause an ANALYZE
> afterwards? We could end up running with outdated statistics.
We don't invalidate the value statistics in pg_stats by ANALYZE presently.
Also, the runtime statistics are not invalidated -- it cound be a bug.
pgstat_drop_relation() is expecting relid (pg_class.oid) as the argument,
but we pass it relfilenode.
[storage/smgr/smgr.c]
static void
smgr_internal_unlink(RelFileNode rnode, int which, bool isTemp, bool isRedo)
{ ... /* * Tell the stats collector to forget it immediately, too. Skip this in * recovery mode, since the
statscollector likely isn't running (and if * it is, pgstat.c will get confused because we aren't a real backend
*process). */ if (!InRecovery) pgstat_drop_relation(rnode.relNode);
...
}
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center
В списке pgsql-hackers по дате отправления: