X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 19B385339C for ; Mon, 18 Apr 2005 16:24:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 46058-10 for ; Mon, 18 Apr 2005 19:24:47 +0000 (GMT) Received: from mail.deg.cc (mail.deg.cc [64.139.134.201]) by svr1.postgresql.org (Postfix) with ESMTP id 83B3B533B5 for ; Mon, 18 Apr 2005 16:24:46 -0300 (ADT) Received: from deg.cc (unknown [205.242.255.66]) by mail.deg.cc (Postfix) with ESMTP id 04CFF560A5 for ; Mon, 18 Apr 2005 15:24:42 -0400 (EDT) Message-ID: <4264097D.7090808@deg.cc> Date: Mon, 18 Apr 2005 15:24:45 -0400 From: Pallav Kalva User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin Subject: Postgres Log rotation not working in 8.0.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/235 X-Sequence-Number: 17248 Hi Everybody, Postgres log rotation doesnt seem to behave properly, below are the settings which I used for log rotation. I want the postgres log to be rotated every week , its past over a week now and it still writing to the old log. Are these settings right for what I want to achieve ? or am I missing something ? Please advice, we are planning to go production soon and dont want to change my settings later. TIA, Pallav #--------------------------------------------------------------------------- # ERROR REPORTING AND LOGGING #--------------------------------------------------------------------------- # - Where to Log - #log_destination = 'stderr' # Valid values are combinations of stderr, # syslog and eventlog, depending on # platform. # This is relevant when logging to stderr: redirect_stderr = true # Enable capturing of stderr into log files. # These are only relevant if redirect_stderr is true: log_directory = '/var/lib/pgsql/pg_log' # Directory where log files are written. # May be specified absolute or relative to PGDATA log_filename = 'postgresql-%U.log' # Log file name pattern. # May include strftime() escapes log_truncate_on_rotation = true # If true, any existing log file of the # same name as the new log file will be truncated # rather than appended to. But such truncation # only occurs on time-driven rotation, # not on restarts or size-driven rotation. # Default is false, meaning append to existing # files in all cases. log_rotation_age = 10080 # Automatic rotation of logfiles will happen after # so many minutes. 0 to disable. log_rotation_size = 0 # Automatic rotation of logfiles will happen after # so many kilobytes of log output. 0 to disable. # These are relevant when logging to syslog: #syslog_facility = 'LOCAL0' #syslog_ident = 'postgres'