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  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Список 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 по дате отправления:

Предыдущее
От: "Jaime Casanova"
Дата:
Сообщение: month abreviation
Следующее
От: ITAGAKI Takahiro
Дата:
Сообщение: autovacuum launcher continues to run after reloading autovacuum=off