BUG #3900: 0 byte .log files created when not using strerr - Mailing list pgsql-bugs

From Chris Hoover
Subject BUG #3900: 0 byte .log files created when not using strerr
Date
Msg-id 200801242035.m0OKZ9oN072519@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #3900: 0 byte .log files created when not using strerr
List pgsql-bugs
The following bug has been logged online:

Bug reference:      3900
Logged by:          Chris Hoover
Email address:      revoohc@gmail.com
PostgreSQL version: 8.3.rc2
Operating system:   RHES 4.0
Description:        0 byte .log files created when not using strerr
Details:

I am using the syslog and csvlog options in my postgresql.conf.  I am
rotating the logs every hour, and every hour I get a growing .csv file in
the log_destination along with a 0 byte .log file.  Since I am not logging
to stderr, the .log file should not be created.

Here is the relevent portion of my postgresql.conf file:

#---------------------------------------------------------------------------
---
# 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.cvs'        # 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'

pgsql-bugs by date:

Previous
From: "Chris Hoover"
Date:
Subject: BUG #3901: Received error
Next
From: Tom Lane
Date:
Subject: Re: BUG #3900: 0 byte .log files created when not using strerr