From: | "Claus Guttesen" <kometen(at)gmail(dot)com> |
---|---|
To: | "System/IJS - Joko" <system(at)ijs(dot)co(dot)id> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: log_statement at postgres.conf |
Date: | 2008-07-17 09:29:23 |
Message-ID: | b41c75520807170229x7768f6d3u68fb6369bafea270@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
> After setting log_statement='all' at postgres.conf,
> then i'm rebooting OS [freeBSD or CentOS],
> i can't find where log file created from log_statement='all' located...
> FYI, location of postgres.conf at /var/lib/pgsql/data/postgres.conf
>
> many thanks..
I added the following to FreeBSD:
/etc/newsyslog.conf:
/var/log/postgresql 600 7 * @T00 JC
/etc/syslog.conf:
local0.* /var/log/postgresql
/usr/local/pgsql/data/postgresql.conf:
log_destination = 'syslog'
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
log_min_duration_statement = 100 # -1 is disabled, 0 logs all
statements, in ms.
Remember to touch /var/log/postgresql before restarting syslogd (kill
-HUP syslog-pid). Chmod 0700 so only root can read the log-file.
Adjust log_min_duration_statement to your needs.
I found this recipe somewhere, but don't remember where so I can't
give credit to the that person.
--
regards
Claus
When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.
Shakespeare
From | Date | Subject | |
---|---|---|---|
Next Message | Pomarede Nicolas | 2008-07-17 09:40:13 | Re: log_statement at postgres.conf |
Previous Message | System/IJS - Joko | 2008-07-17 08:43:59 | log_statement at postgres.conf |