Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 2BFAF2E3624 for ; Thu, 10 Jan 2008 18:45:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 65379-07 for ; Thu, 10 Jan 2008 18:45:34 -0400 (AST) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.184]) by postgresql.org (Postfix) with ESMTP id C02B82E3415 for ; Thu, 10 Jan 2008 18:45:37 -0400 (AST) Received: by rv-out-0910.google.com with SMTP id l15so852857rvb.43 for ; Thu, 10 Jan 2008 14:45:36 -0800 (PST) Received: by 10.141.145.11 with SMTP id x11mr1585856rvn.23.1200005136055; Thu, 10 Jan 2008 14:45:36 -0800 (PST) Received: by 10.140.128.5 with HTTP; Thu, 10 Jan 2008 14:45:36 -0800 (PST) Message-ID: <33671a790801101445j7f3c8644wf41c1e6fced8bedc@mail.gmail.com> Date: Thu, 10 Jan 2008 22:45:36 +0000 From: "Andy Shellam" To: pgsql-admin@postgresql.org Subject: 8.3 RC1 - Logging and filenames MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27966_10086310.1200005136077" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/112 X-Sequence-Number: 27886 ------=_Part_27966_10086310.1200005136077 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I'm just trying out the RC1 release of 8.3, and I'm seeing something strange with the logging configuration. What I want PostgreSQL to do is put a log file "postgresql.log" in "/var/log/pgsql" - I have an application that handles log rotations, so would prefer to do it with that, rather than have PostgreSQL do the rotation. I would have thought my config shown below would have made this happen, but it doesn't appear so. Instead PostgreSQL creates a file called " postgresql.log.1200003749" in /var/log/pgsql. Best of it is, I cannot work out what those numbers mean. The time at which PostgreSQL was started was 22:37 on 10th Jan 2008. So I can figure out that "3749" is probably the minutes and seconds. The process IDs are in the 32,200s so it's not the PID either. Is this a bug, or am I just missing something? My postgresql.conf reads: # - Where to Log - log_destination = 'stderr' # Valid values are combinations of # stderr, csvlog, syslog and eventlog, # depending on platform. csvlog # requires logging_collector to be on. # This is used when logging to stderr: logging_collector = on # Enable capturing of stderr and csvlog # into log files. Required to be on for # csvlogs. # (change requires restart) # These are only used if logging_collector is on: log_directory = '/var/log/pgsql' # directory where log files are written, # can be absolute or relative to PGDATA log_filename = 'postgresql.log' # log file name pattern, # can include strftime() escapes #log_truncate_on_rotation = off # If on, an 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 # off, meaning append to existing files # in all cases. log_rotation_age = 0 # Automatic rotation of logfiles will # happen after that time. 0 to disable. log_rotation_size = 0 # Automatic rotation of logfiles will Regards, Andy ------=_Part_27966_10086310.1200005136077 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

I'm just trying out the RC1 release of 8.3, and I'm seeing something strange with the logging configuration.
What I want PostgreSQL to do is put a log file "postgresql.log" in "/var/log/pgsql" - I have an application that handles log rotations, so would prefer to do it with that, rather than have PostgreSQL do the rotation.

I would have thought my config shown below would have made this happen, but it doesn't appear so.  Instead PostgreSQL creates a file called "postgresql.log.1200003749" in /var/log/pgsql.

Best of it is, I cannot work out what those numbers mean.  The time at which PostgreSQL was started was 22:37 on 10th Jan 2008.  So I can figure out that "3749" is probably the minutes and seconds.  The process IDs are in the 32,200s so it's not the PID either.

Is this a bug, or am I just missing something?

My postgresql.conf reads:

# - Where to Log -

log_destination = 'stderr'              # Valid values are combinations of
                                        # stderr, csvlog, syslog and eventlog,
                                        # depending on platform.  csvlog
                                        # requires logging_collector to be on.

# This is used when logging to stderr:
logging_collector = on          # Enable capturing of stderr and csvlog
                                        # into log files. Required to be on for
                                        # csvlogs.
                                        # (change requires restart)

# These are only used if logging_collector is on:
log_directory = '/var/log/pgsql'                # directory where log files are written,
                                        # can be absolute or relative to PGDATA
log_filename = 'postgresql.log ' # log file name pattern,
                                        # can include strftime() escapes
#log_truncate_on_rotation = off         # If on, an 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
                                        # off, meaning append to existing files
                                        # in all cases.
log_rotation_age = 0                    # Automatic rotation of logfiles will
                                        # happen after that time.  0 to disable.
log_rotation_size = 0           # Automatic rotation of logfiles will


Regards,

Andy
------=_Part_27966_10086310.1200005136077--