From: | pg noob <pgnube(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | 8.4.12 log truncation not working? |
Date: | 2012-07-30 13:48:38 |
Message-ID: | CAPNY-2XoHM8Z8Zkr3fLVT=Q6-Efdf4Hq7SPC_8o17RJPvjRViA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hi all,
For some reason the log truncation doesn't seem to be working on my server.
I have set log_rotation_age to 1 day and log_truncate_on_rotation to on.
log_destination |
csvlog,syslog | Sets the destination
for server log output.
log_directory |
pg_log | Sets the destination
directory for log files.
log_filename |
postgresql-%a.log | Sets the file name
pattern for log files.
log_rotation_age |
1d | Automatic log file
rotation will occur after N minutes.
log_rotation_size |
0 | Automatic log file
rotation will occur after N kilobytes.
log_truncate_on_rotation |
on | Truncate existing log
files of same name during log rotation.
server_version |
8.4.12 | Shows the server
version.
Log timezone is UTC.
What is happening is that I get log files that continue to get appended
with each rotation instead of getting truncated.
So, in postgresql-Fri.csv, I see this:
2012-07-20 23:59:12.146
UTC,"sysdba",5950,"[local]",5009f054.173e,173,"COMMIT",2012-07-20 23:57:08
UTC,3/0,0,LOG,00000,"duration: 0.353 ms statement: COMMIT;;",,,,,,,,
2012-07-27 00:00:03.044
UTC,"sysdba",26539,"[local]",5011da03.67ab,1,"SELECT",2012-07-27 00:00:03
UTC,6/0,0,LOG,00000,"duration: 0.423 ms statement: select datname, oid
from pg_database",,,,,,,,
A jump from Friday the 20th to Friday the 27th with no truncation.
I don't have any periodic scheduled Postgres restarts but the server does
get restarted frequently.
How can I fix this so that it gets truncated when it rolls around to the
same day of the week again?
Thanks and Regards,
James
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-07-30 14:27:46 | Re: 8.4.12 log truncation not working? |
Previous Message | Ioannis Anagnostopoulos | 2012-07-30 08:39:42 | Re: Running analysis as part of a stored proc |