From: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | contrib/pg_stat_statements v2 |
Date: | 2008-10-27 08:40:45 |
Message-ID: | 20081027171917.ADD6.52131E4D@oss.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Here is an updated version of contrib/pg_stat_statements module.
I wrote:
> A shutdown hook is probably not needed because I can use proc_exit()
> or shmem_exit() for the purpose.
I added shutdown hook eventually because MyProc has been reset already
in on_shmem_exit(). A callback that resets MyProc is registered to
on_shmem_exit after shared_preload_libraries are loaded and callbacks
are called in order of LIFO.
Attached files are:
* startup+shutdown_hooks-1027.patch
The patch modifies corecode in the 3 points:
- startup_hook:
Called on server startup by startup process
where LoadFreeSpaceMap() in 8.3 had been called.
- shutdown_hook:
Called on server shutdown by bgwriter
where DumpFreeSpaceMap() in 8.3 had been called.
- shared_preload_libraries are loaded by auxiliary processes:
Windows port requires it.
* pg_stat_statements-1027.tgz
The pg_stat_statements contrib module. It requires patches
startup+shutdown_hooks-1027.patch (above) and auto_explain.patch
( http://archives.postgresql.org/message-id/20081009165157.9BE4.52131E4D@oss.ntt.co.jp ) .
Now it dumps statistics into file at server shutdown and load it
at the next restart. The default path of the saved file is
'global/pg_stat_statements.dump'.
* pgstatstatements.sgml
Documentation of the module.
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
pg_stat_statements-1027.tgz | application/octet-stream | 6.9 KB |
pgstatstatements.sgml | application/octet-stream | 8.2 KB |
startup+shutdown_hooks-1027.patch | application/octet-stream | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Koichi Suzuki | 2008-10-27 08:41:21 | Re: Making pg_standby compression-friendly |
Previous Message | ITAGAKI Takahiro | 2008-10-27 08:00:39 | Re: contrib/pg_stat_statements |