Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id D27F7632C27 for ; Fri, 12 Feb 2010 17:03:10 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 04672-07 for ; Fri, 12 Feb 2010 21:02:56 +0000 (UTC) X-Greylist: delayed 00:09:07.246924 by SQLgrey-1.7.6 Received: from jonah.home.setonhome.org (mail.setonhome.org [76.3.225.43]) by mail.postgresql.org (Postfix) with ESMTP id D4F69632563 for ; Fri, 12 Feb 2010 17:02:59 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by jonah.home.setonhome.org (Postfix) with ESMTP id 34AB06CC652; Fri, 12 Feb 2010 15:53:52 -0500 (EST) Received: from jonah.home.setonhome.org ([127.0.0.1]) by localhost (jonah.home.setonhome.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wnP4bRoYVq1e; Fri, 12 Feb 2010 15:53:51 -0500 (EST) Received: from [127.0.0.1] (unknown [76.3.225.44]) by jonah.home.setonhome.org (Postfix) with ESMTP id A96AE6CC602; Fri, 12 Feb 2010 15:53:51 -0500 (EST) Message-ID: <4B75BFD6.8050701@setonhome.org> Date: Fri, 12 Feb 2010 15:53:42 -0500 From: Lewis Kapell Organization: Seton Home Study School User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: DM CC: pgsql-admin@postgresql.org Subject: Re: Postgres log help - Postgresql-8.3.5 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.392 tagged_above=-10 required=5 tests=AWL=-1.207, BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201002/114 X-Sequence-Number: 33717 Did you issue the reload command using pg_ctl after editing your postgresql.conf, to tell the server to pick up the changes? If you issue the following within a psql session, it will tell you what config value the server is currently using: show log_line_prefix; Looks like either your server hasn't reloaded the updated config file, or you edited the wrong config file. Lewis DM wrote: > Hi All, > > I am not able to figure out how to change the logging to a single line, > > *My log file out puts* > > LOG: duration: 0.492 ms > LOG: duration: 0.397 ms > LOG: duration: 0.097 ms > LOG: execute : select count(*) from v_mthly_demo_rollup > LOG: duration: 211.724 ms > LOG: duration: 0.499 ms > LOG: duration: 0.082 ms > LOG: execute : select count(*) from v_mthly__demo_rollup where > (demo_nm='test' AND rollup_eff_yr_mth='200912') > LOG: duration: 0.544 ms > LOG: duration: 0.334 ms > LOG: duration: 0.036 ms > > *I want my log file to output something like in the below format* > * > * > 2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net > (45872)|11683|2010-02-12 11:01:48.630 > PST|SELECT|4b72f31d.2da3|8709|2010-02-10 09:55:41 PST|0LOG: duration: > 0.099 ms > 2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net > (45872)|11683|2010-02-12 11:01:48.630 > PST|BIND|4b72f31d.2da3|8710|2010-02-10 09:55:41 PST|0LOG: duration: > 0.011 ms > > Here is my postgresql.conf file log configuration information > > # ERROR REPORTING AND LOGGING > #------------------------------------------------------------------------------ > > # - Where to Log - > > logging_collector = on # changed on 04/07/2009 > log_directory = '/db_log/demo/pgsql8.3.5/pg_log' # changed on > 04/07/2009 > log_filename = 'postgresql-v8.3.5-%Y-%m-%d_%H%M%S.log' # changed on > 04/07/2009 > log_truncate_on_rotation = on # changed on 04/07/2009 > log_rotation_age = 1d # Automatic rotation of logfiles > will > log_rotation_size = 100MB # changed on 04/07/2009 > log_line_prefix = '%u|%d|%r|%p|%t|%m|%i|%c|%l|%s|%x' # changes done on > 05/15/2009 : > log_checkpoints = on > log_connections = on > log_disconnections = on > log_duration = on > log_hostname = on > log_line_prefix = '' # special values: > log_lock_waits = on #changed on 04/07/2009 > log_statement = 'all' # changed below 6 lines on > 04/07/2009 > #------------------------------------------------------------------------------ > > Which parameter should I need to change to output in my log in the below > format > 2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net > (45872)|11683|2010-02-12 11:01:48.630 > PST|SELECT|4b72f31d.2da3|8709|2010-02-10 09:55:41 PST|0LOG: duration: > 0.099 ms > 2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net > (45872)|11683|2010-02-12 11:01:48.630 > PST|BIND|4b72f31d.2da3|8710|2010-02-10 09:55:41 PST|0LOG: duration: > 0.011 ms > > Thanks > Deepak