On 01/13/2012 05:29 AM, Christopher Maujean wrote:
> In reviewing the referenced patch, we found that it has no developer
> documentation and no regression tests. While it compiles and installs,
> there is nothing to tell us how to use (or test) it.
Thanks for reviewing!
I think the regression tests should be part of the module that uses
the hooks. Alas, there are none that we'd want to ship with Postgres
at this time.
The best I could offer for testing the hooks is a log forwarding module
I've been working on. Basically, what it does is that it installs the
hooks, looks at the message emitted by backend and if needed sends it
away via UDP. Available at: https://github.com/mpihlak/pg_logforward
To install, run "make install" and modify postgresql.conf to include:
shared_preload_libraries = 'pg_logforward'
logforward.target_names = 'jsonsrv'
logforward.jsonsrv_host = '127.0.0.1'
logforward.jsonsrv_port = 23456
Now, after restarting postgres, you could use "nc 23456 -u -l" to
receive the log. Alternatively use testing/test_logserver.py as a
About documentation - it sure would be nice to have all the hooks
written up somewhere. Any suggestions as to where to put it?
In response to
pgsql-hackers by date
|Next:||From: Joachim Wieland||Date: 2012-01-15 18:01:43|
|Subject: patch for parallel pg_dump|
|Previous:||From: Tom Lane||Date: 2012-01-15 17:20:44|
|Subject: Re: pgstat documentation tables |