Tom Lane <[EMAIL PROTECTED]> wrote: > It needs to be a contrib or pgfoundry package for awhile, > to shake out feature issues in a context where users will understand > the API is subject to change.
Agreed. That is what I want to do at first. > It seems to me that all you're really missing is a shutdown hook > someplace, which would be a reasonable core addition. A shutdown hook is probably not needed because I can use proc_exit() or shmem_exit() for the purpose. - On Windows, shared_preload_libraries will be loaded not only by postmaster and backends but also by auxiliary processes. (I think it is also required by rmgr hooks.) - Add a function BgWriterIAm() to export a variable am_bg_writer. It is used for dumping stats data on shutdown as following: on_proc_exit( dump_stats_if_BgWriterIAm ); - It might be cleaner to add a callback function on_startup(). Registered functions are called by startup process after REDO. It is used for loading stats data, but is not always necessary because the first user of the module can load the data. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers