Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TB5YH-00041a-49 for pgsql-bugs@postgresql.org; Mon, 10 Sep 2012 15:05:29 +0000 Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TB5YF-0002tx-8T for pgsql-bugs@postgresql.org; Mon, 10 Sep 2012 15:05:28 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TB5YD-0001jC-9G for pgsql-bugs@postgresql.org; Mon, 10 Sep 2012 15:05:27 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1TB5YC-00080h-Qv for pgsql-bugs@postgresql.org; Mon, 10 Sep 2012 15:05:24 +0000 Date: Mon, 10 Sep 2012 15:05:24 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7528: Spurious empty log file created To: pgsql-bugs@postgresql.org From: ajeru@topolyte.com X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201209/82 X-Sequence-Number: 34077 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.