Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 981ED2E36EB for ; Thu, 24 Jan 2008 15:10:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81415-01-6 for ; Thu, 24 Jan 2008 15:10:13 -0400 (AST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by postgresql.org (Postfix) with ESMTP id 4AA0C2E3DA8 for ; Thu, 24 Jan 2008 14:31:57 -0400 (AST) Received: by fg-out-1718.google.com with SMTP id 22so342352fge.23 for ; Thu, 24 Jan 2008 10:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=QHyxWHz30wuOE74W9AcgsPrdGMUjX63GOEu9v38wOq4=; b=QWhIh7O+T2J79xSZWFOeRo0mTtoQQxJUVxc78acO1e+TzgiTl5rRUuWpN+oRiGkyAk3YwwWndyf7IpXPv78sfbq0w7qSfq7A350oiP3dCokmwPo0g/tURLuoT6g4RhcK1GwUborhskYxeh7mFl+Gaq38q4PWXhdjGRTIsrUtEXw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=hIJLBgT8/VwDcPrXUZdLHDUWLJ2FUWmcxbXnV/zjDt4vO/EyoMr5UgYrL1pBmXb90MCurmaunaiyDB+FZfQDoTLSZS5p4RhQtBjvbbtF9BAYyF3hkbEU4G67Lq8b7BvDO6G80eVT/sP6DmBMNEf4NBkS6tQVfIHNQJu1QE8ZWII= Received: by 10.86.28.5 with SMTP id b5mr897243fgb.47.1201199515596; Thu, 24 Jan 2008 10:31:55 -0800 (PST) Received: by 10.86.99.11 with HTTP; Thu, 24 Jan 2008 10:31:55 -0800 (PST) Message-ID: <1d219a6f0801241031p4faa7b3cr2260f97e76bc71e0@mail.gmail.com> Date: Thu, 24 Jan 2008 13:31:55 -0500 From: "Chris Hoover" To: "pgsql-admin@postgresql.org Admin" Subject: 8.3 Logging Question MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_24243_31967266.1201199515599" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/233 X-Sequence-Number: 28007 ------=_Part_24243_31967266.1201199515599 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm running PG 8.3rc2 to start testing it out, and really like how it is preforming for me so far. However, I have one question on the logging. I am trying to use syslog and csvlog to log all sql. This seems to work great except that for every log rotation postgres does, I get a .csv log file that grows and a 0 byte .log file. Since I'm not logging to stderr, why is the .log file being created, and how do I turn that off? Thanks for your help, Chris Relevent config file portion: #------------------------------------------------------------------------------ # ERROR REPORTING AND LOGGING #------------------------------------------------------------------------------ # - Where to Log - log_destination = 'syslog,csvlog' # 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 = 'pg_log' # directory where log files are written, # can be absolute or relative to PGDATA #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, # can include strftime() escapes log_truncate_on_rotation = on # 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 = 1h # Automatic rotation of logfiles will # happen after that time. 0 to disable. log_rotation_size = 0 # Automatic rotation of logfiles will # happen after that much log output. # 0 to disable. # These are relevant when logging to syslog: syslog_facility = 'LOCAL0' syslog_ident = 'postgres' ------=_Part_24243_31967266.1201199515599 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm running PG 8.3rc2 to start testing it out, and really like how it is preforming for me so far.  However, I have one question on the logging.  I am trying to use syslog and csvlog to log all sql.  This seems to work great except that for every log rotation postgres does, I get a .csv log file that grows and a 0 byte .log file.  Since I'm not logging to stderr, why is the .log file being created, and how do I turn that off?

Thanks for your help,

Chris

Relevent config file portion:

#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

log_destination = 'syslog,csvlog'               # 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 = 'pg_log'                # directory where log files are written,
                                        # can be absolute or relative to PGDATA
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'        # log file name pattern,
                                        # can include strftime() escapes
log_truncate_on_rotation = on           # 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 = 1h                   # Automatic rotation of logfiles will
                                        # happen after that time.  0 to disable.
log_rotation_size = 0                   # Automatic rotation of logfiles will
                                        # happen after that much log output.
                                        # 0 to disable.

# These are relevant when logging to syslog:
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'

------=_Part_24243_31967266.1201199515599--