Re: [PATCHES] WIP: executor_hook for pg_stat_statements

Поиск
Список
Период
Сортировка
От ITAGAKI Takahiro
Тема Re: [PATCHES] WIP: executor_hook for pg_stat_statements
Дата
Msg-id 20080708091907.6D35.52131E4D@oss.ntt.co.jp
обсуждение исходный текст
Ответ на Re: [PATCHES] WIP: executor_hook for pg_stat_statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] WIP: executor_hook for pg_stat_statements
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I don't want the tag there at all, much less converted to a pointer.
> What would the semantics be of copying the node, and why?
> 
> Please justify why you must have this and can't do what you want some
> other way.

In my pg_stat_statements plugin, the tag is used to cache hash values of
SQL strings in PlannedStmt. It is not necessarily needed because the hash
value is re-computable from debug_query_string. It is just for avoiding
the work. In addition, we see different SQLs in debug_query_string in
PREPARE/EXECUTE and DECLARE/FETCH. Hashed SQL cache can work on those
commands.

However, it's ok to remove the tag field from the patch if we should
avoid such an unused field in normal use. EXECUTE and FETCH issues
could be solved if I write simple SQL parser in my plugin because SQL
bodies can be fetched from pg_prepared_statements and pg_cursors.

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




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.1 index corruption woes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: CommitFest rules