Re: Logging Parameter Values

From: Volkan YAZICI <yazicivo(at)ttmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Logging Parameter Values
Date: 2008-06-20 06:08:34
Message-ID: 87wskkaba5.fsf@alamut.mobiliz.com.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 19 Jun 2008, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Volkan YAZICI <yazicivo(at)ttmail(dot)com> writes:
>> # tail -n 2 /srv/pg/pg_log/2008-06-19_141725.log
>> migration_test postgres 2008-06-19 17:58:05.185 EEST LOG: duration: 2315.420 ms statement: EXECUTE foo(1000);
>> migration_test postgres 2008-06-19 17:58:05.185 EEST DETAIL: prepare: PREPARE foo (int) AS SELECT S.i * T.i FROM generate_series(1, $1) AS S(i), generate_series(1, $1) AS T(i);
>
> Hmm, we're not on the same page here. I thought you were talking about
> protocol-level parameters. In the above example, the parameter values
> are shown in the EXECUTE statement, so what else do you need?

Umm... Bogus test case.

CL-USER> (postmodern:connect-toplevel
"migration_test" "postgres" nil "192.168.1.160")
; No value
CL-USER> (and (postmoder:query
(concatenate 'string
"SELECT S.i * T.*"
" FROM generate_series(1, $1) AS S (i),"
" generate_series(1, $2) AS T (i)")
1000 1000)
nil)
NIL

# tail /srv/pg/pg_log/2008-06-19_141725.log -n 2
migration_test postgres 2008-06-20 09:02:33.695 EEST LOG: duration: 4419.475 ms execute <unnamed>: SELECT S.i * T.* FROM generate_series(1, $1) AS S (i), generate_series(1, $2) AS T (i)
migration_test postgres 2008-06-20 09:02:33.695 EEST DETAIL: parameters: $1 = '1000', $2 = '1000'

Hrm... Now what might have caused the logged statements with missing
parameter values I pasted. I was probably looking at past log files
belongs to some other logging configuration.

Excuse me for the noise. And thanks for the prompt reply.

Regards.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Garry Saddington 2008-06-20 06:41:42 Re: Losing data
Previous Message Tom Lane 2008-06-20 04:49:13 Re: Losing data