pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lewis Kapell <lkapell@setonhome.org>
To: DM <dm.aeqa@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgres log help - Postgresql-8.3.5
Date: Fri, 12 Feb 2010 15:53:42 -0500
Message-ID: <4B75BFD6.8050701@setonhome.org> (raw)
In-Reply-To: <eae6a62a1002121204t2b030fcbp70caa9788ebcca37@mail.gmail.com>
References: <eae6a62a1002121204t2b030fcbp70caa9788ebcca37@mail.gmail.com>

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 <unnamed>: select count(*) from v_mthly_demo_rollup
> LOG:  duration: 211.724 ms
> LOG:  duration: 0.499 ms
> LOG:  duration: 0.082 ms
> LOG:  execute <unnamed>: 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 
> <http://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 
> <http://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 
> <http://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 
> <http://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




view thread (3+ messages)  latest in thread

Message-ID: <4B75BFD6.8050701@setonhome.org>
Permalink:  ../4B75BFD6.8050701@setonhome.org/
Also on:    postgresql.org/message-id/4B75BFD6.8050701@setonhome.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: lkapell@setonhome.org, dm.aeqa@gmail.com
  Subject: Re: Postgres log help - Postgresql-8.3.5
  In-Reply-To: <4B75BFD6.8050701@setonhome.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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