Thread: BUG #7528: Spurious empty log file created
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 =3D 'csvlog' logging_collector =3D on log_directory =3D 'pg_log' log_filename =3D 'pg-%Y-%m-%d_%H%M%S.log' log_rotation_age =3D 1d log_rotation_size =3D 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.
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