Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 459AD63321A for ; Fri, 12 Feb 2010 16:04:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14761-05 for ; Fri, 12 Feb 2010 20:04:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f191.google.com (mail-px0-f191.google.com [209.85.216.191]) by mail.postgresql.org (Postfix) with ESMTP id 7B7E8632D8B for ; Fri, 12 Feb 2010 16:04:18 -0400 (AST) Received: by pxi29 with SMTP id 29so1690834pxi.1 for ; Fri, 12 Feb 2010 12:04:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=hU+t+h0n2WVdQbanckP/WjEIAi/F173ijQqxVjJxTgw=; b=lvHQAbdTbQAskmGIdcehprZ5OZ55YSo4D26eLDGZUYHdPxcbm9X1jhTUW0wTx3oHga BL5x9ghF6Mk+z+5+db4YZgNUjJgISwRbsUlKyrH86+qCcFVX5KfHYUbnKDAIT+ysCiJy 0qP1QdraIZ4yxdvGSr/6Y4FTUjN4BGqr+sgeA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Gf/eZ81nDMZ8IMFs+dJz+6ZQooKtNYn5lc4rG4xfUd8NwHk2CTsHzLyLDtA3zLmVTi 6MT4TBaF/8VhLppk8R1QuxJFwe8XuhRODS395SnPWYWem2RXYfctCDd1z+V2x1eLVBgj 03UNhSO8cnLTku2Ztzte5WEi7/Q9gBMyD9JRk= MIME-Version: 1.0 Received: by 10.141.14.6 with SMTP id r6mr1212872rvi.280.1266005056563; Fri, 12 Feb 2010 12:04:16 -0800 (PST) Date: Fri, 12 Feb 2010 12:04:16 -0800 Message-ID: Subject: Postgres log help - Postgresql-8.3.5 From: DM To: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd11252ae2a8c047f6cc514 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.739 tagged_above=-10 required=5 tests=BAYES_20=-0.74, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201002/113 X-Sequence-Number: 33716 --000e0cd11252ae2a8c047f6cc514 Content-Type: text/plain; charset=ISO-8859-1 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 --000e0cd11252ae2a8c047f6cc514 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi All,=A0

I am not able to figure out how to change the= logging to a single line,

My log file out puts=

LOG: =A0duration: 0.492 ms
LOG= : =A0duration: 0.397 ms
LOG: =A0duration: 0.097 ms
LOG: =A0execute <unnamed>: = select count(*) from v_mthly_demo_rollup
LOG: =A0duration: 211.72= 4 ms
LOG: =A0duration: 0.499 ms
LOG: =A0duration: 0.082= ms
LOG: =A0execute <unnamed>: select count(*) from v_mthly__demo_ro= llup where (demo_nm=3D'test' AND rollup_eff_yr_mth=3D'200912= 9;)
LOG: =A0duration: 0.544 ms
LOG: =A0duration: 0.334 = ms
LOG: =A0duration: 0.036 ms

I want my log f= ile to output something like in the below format

<= /div>
2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net(45872)|11683|2010-02-12 11:01:48.630 PS= T|SELECT|4b72f31d.2da3|8709|2010-02-10 09:55:41 PST|0LOG: =A0duration: 0.09= 9 ms
2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net(45872)|11683|2010-02-12 11:01:48.630 PST|BIND|4b7= 2f31d.2da3|8710|2010-02-10 09:55:41 PST|0LOG: =A0duration: 0.011 ms

Here is my postgresql.conf file log configuration informatio= n

# ERROR REPORTING AND LOGGING
#--= ---------------------------------------------------------------------------= -

# - Where to Log -

logging_col= lector =3D on =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# changed on 04/07/2009
log_directory =3D '/db_log/demo/pgsql8.3.5/pg_log' =A0 =A0 = =A0 =A0 =A0# changed on 04/07/2009
log_filename =3D 'postgresql-v8.3.5-%Y-%m-%d_%H%M%S.log' =A0 = =A0# =A0changed on 04/07/2009
log_truncate_on_rotation =3D on =A0= =A0 =A0 =A0 =A0 # changed on 04/07/2009
log_rotation_age =3D 1d = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 # Automatic rotation of logfiles will
log_rotation_size =3D 100MB =A0 =A0 =A0 =A0 =A0 =A0 =A0 # changed on 0= 4/07/2009
log_line_prefix =3D '%u|%d|%r|%p|%t|%m|%i|%c|%l|%s|= %x' # changes done on 05/15/2009 =A0:
log_checkpoints =3D on<= /div>
log_connections =3D on
log_disconnections =3D on
log_duration =3D on
log_= hostname =3D on
log_line_prefix =3D '' =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 # special values:
log_lock_waits =3D on =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 #changed on 04/07/2009
log_statement =3D 'all' =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 # = changed below 6 lines on 04/07/2009
#----------------------------= --------------------------------------------------

Which parameter should I need to change to output in my log in the below f= ormat
2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net(45872)|11683|2010-02-12 11:01:48.630 PST|SEL= ECT|4b72f31d.2da3|8709|2010-02-10 09:55:41 PST|0LOG: =A0duration: 0.099 ms<= /div>
2010-02-12 11:01:48 PST|usr|dbdemo|server-res0003.net(45872)|11683|2010-02-12 11:01:48.630 PST|BIND|4b7= 2f31d.2da3|8710|2010-02-10 09:55:41 PST|0LOG: =A0duration: 0.011 ms

Thanks
Deepak
--000e0cd11252ae2a8c047f6cc514--