>> I added the following to FreeBSD:
>> /var/log/postgresql 600 7 * @T00 JC
make new file?
>> local0.* /var/log/postgresql
>> log_destination = 'syslog'
>> syslog_facility = 'LOCAL0'
>> syslog_ident = 'postgres'
>> log_min_duration_statement = 100 # -1 is disabled, 0 logs all
>> statements, in ms.
I already do this, but i can't find my log file
FYI, i just wanna to log every SQL statement.
>> 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 don't understand "to touch /var/log/postgresql"
> another possibility is to have logs stored in a file by just changing
> 'redirect_stderr' to 'on' and 'log_destination' to 'stderr'.
> This way, with the default config, all logs sent to stderr will be written
> to 'log_directory' under the name 'log_filename', without having to change
> syslog.conf (you just need to change postgresql.conf).
> Additionaly, I added 'log_rotation_size = 0' to have on log file per day.
> Note that in that case, the log files won't be rotated, you'll need to
> check you don't store too many log file after a few months (as the number
> of files will increase every day).
setting 'log_destination' to 'stderr' could also log every sql statement happen on my server?
My mission is to activate 'log_statement' to 'all', so that i can log all sql activity on my database.
PT. Indra Jaya Swastika
Phone: +62 31 7481388 Ext 201
If you have any problem with our services ,
please contact us at 70468146 or e-mail: helpdesk(at)ijs(dot)co(dot)id
PT Indra Jaya Swastika | Jl. Kalianak Barat 57A | +62-31-7481388
In response to
pgsql-performance by date
|Next:||From: Pomarede Nicolas||Date: 2008-07-18 08:16:00|
|Subject: Re: log_statement at postgres.conf|
|Previous:||From: Tom Lane||Date: 2008-07-18 04:37:31|
|Subject: Re: index scan cost |