> * auto_explain.tgz > A contrib module version of auto-explain. > An arguable part is initializing instruments in ExecutorRun_hook. > The initialization should be done in ExecutorStart normally, but > it is too late in the hook. Is it safe? or are there any better idea? > README is a plain-text for now, and I'll rewrite it in sgml if needed. >
How about adding a new hook to control instrumentation of queries in ExecutorStart? Something like: typedef bool (*ExecutorDoInstrument_hook_type) (QueryDesc *queryDesc, int eflags); extern PGDLLIMPORT ExecutorDoInstrument_hook_type ExecutorDoInstrument_hook; I think that would allow your module code to be simplified, and it would allow other future extensions to hook in and enable instrumentation before queries are run. Regards, Dean. _________________________________________________________________ Win a voice over part with Kung Fu Panda & Live Search and 100’s of Kung Fu Panda prizes to win with Live Search http://clk.atdmt.com/UKM/go/107571439/direct/01/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers