pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #7528: Spurious empty log file created
2+ messages / 2 participants
[nested] [flat]

* BUG #7528: Spurious empty log file created
@ 2012-09-10 15:05  ajeru@topolyte.com
  0 siblings, 1 reply; 2+ messages in thread

From: ajeru@topolyte.com @ 2012-09-10 15:05 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      7528
Logged by:          Alexander Jerusalem
Email address:      ajeru@topolyte.com
PostgreSQL version: 9.2.0
Operating system:   Linux (Ubuntu x86_64, kernel version 2.6.18)
Description:        

I have the following log configuration in postgresql.conf:

log_destination = 'csvlog'
logging_collector = on
log_directory = 'pg_log'
log_filename = 'pg-%Y-%m-%d_%H%M%S.log'
log_rotation_age = 1d
log_rotation_size = 10MB

After removing all files from pg_log and relaunching the postgres server,
pg_log contains two files instead of one: pg-xxx.log and pg-xxx.csv.
According to the documentation, only pg-xxx.csv should exist. And in fact
only pg-xxx.csv is actually written to whilst pg-xxx.log remains empty.

Using a .csv extenson or no extension at all for the log_filename setting
doesn't help either. Postgres always creates a file named exactly as the
log_filename setting says and a second one with .csv appended.






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #7528: Spurious empty log file created
@ 2012-09-10 16:09  Tom Lane <tgl@sss.pgh.pa.us>
  parent: ajeru@topolyte.com
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2012-09-10 16:09 UTC (permalink / raw)
  To: ajeru@topolyte.com; +Cc: pgsql-bugs

ajeru@topolyte.com writes:
> After removing all files from pg_log and relaunching the postgres server,
> pg_log contains two files instead of one: pg-xxx.log and pg-xxx.csv.
> According to the documentation, only pg-xxx.csv should exist.

Not sure where you read that, but the plain log file is always created.
It's there to support code that might randomly write on stderr, for
instance third-party code such as Perl.

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-09-10 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-10 15:05 BUG #7528: Spurious empty log file created ajeru@topolyte.com
2012-09-10 16:09 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox