pgstat_drop_relation bugfix

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема pgstat_drop_relation bugfix
Дата
Msg-id 20070626195741.6A3D.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
обсуждение исходный текст
Ответы Re: pgstat_drop_relation bugfix  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
I wrote:
> > pgstat_drop_relation() is expecting relid (pg_class.oid) as the argument,
> > but we pass it relfilenode.
> I'm trying to fix the bug, because there is a possibility that some useless
> statistics data continue to occupy some parts of the statistics table.

Here is a patch to fix undropped entries in the runtime statistics table.
Now smgr records the relation oids and uses them to drop entries
corresponding the relations.

We could make stray entries easily using the following queries.
  CREATE TABLE test (i integer);
  INSERT INTO test VALUES(1);
  TRUNCATE test;
  DROP TABLE test;

Since we don't discard any of stat entries except pg_stat_reset(),
those useless entries would cause memory leaks, though it is very trivial.

I fell my fix is uncool; Let me know if there are any other better ways.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center


Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Load Distributed Checkpoints, take 3
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: [HACKERS] msvc and vista fun