Well, I got pg_options and syslog (and ELOG timestamping) figured out --
however, there is a quirk:
With syslog set to 2 (supposedly suppressing ANY stderr/stdout, I still get
some output (I know that the documentation mentions this) )-- the output I am
getting is "reset_client_encoding().. reset_client_encoding() done" immediately after a InitPostgres
log line. Incidentally, the two reset_client_encoding lines are not
timestamped, while the InitPostgres line IS.
To get syslog functionality working (at least under RedHat Linux 6.1/Intel), do
the following:
Either edit src/include/config.h.in before configure, or edit
src/include/config.h after configure but before make (for RPM-building, I patch
config.h.in before running configure) -- uncomment both ELOG_TIMESTAMPS and
USE_SYSLOG.
In $PGDATA/pg_options, make verbose=1 or 2, and syslog >0 -- read the
pg_options page in the admin docs for more stuff you can put in pg_options.
To get information into the syslog, in /etc/syslog.conf place a line:
local0.* /var/log/postgresql
and /var/log/postgresql will get ALL those messages. NICE. Log rotation under
RedHat is a simple config file in /etc/logrotate.d......
These changes (including the syslog.conf one) will be in the next RPM
set to be released.
Massimo, what syslog levels are you using (I've perused
src/backend/misc/trace.c, but, unfortunately, my knowledge of syslog code is
weak)?
Man, those regression tests really issue the queries (normally, my system will
do the non-parallel regression in about 2:15, but with syslog and query=4, it
takes 3:14).
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11