tracking down a warning

Started by Ivan Sergio Borgonovoover 17 years ago5 messagesgeneral
Jump to latest
#1Ivan Sergio Borgonovo
mail@webthatworks.it

I can't find what's the statement causing this warning:

2008-11-19 14:45:34 CET WARNING: nonstandard use of \\ in a string
literal at character 32 2008-11-19 14:45:34 CET HINT: Use the
escape string syntax for backslashes, e.g., E'\\'.

I mean... I know how to fix it... but how can I find the statement?

Which is the right log config to tweak to get enough info to be able
to use grep on my code base without producing 2Gb logs in 5min?

BTW can this log config be tweaked dynamically? by connection etc...
or just in postgres.conf?

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

#2Grzegorz Jaśkiewicz
gryzman@gmail.com
In reply to: Ivan Sergio Borgonovo (#1)
Re: tracking down a warning

change loging level to debug1 in postgresql.conf, it will log statements.
you don't have to reboot postgres for that - just reload it (either pg_ctl
reload - as opstgres user, or /etc/init.d/postgres reload).

#3Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: Grzegorz Jaśkiewicz (#2)
Re: tracking down a warning

On Wed, 2008-11-19 at 13:54 +0000, Grzegorz Jaśkiewicz wrote:

change loging level to debug1 in postgresql.conf, it will log
statements.

Why not just setting log_statement to all? (or whatever)
--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org

#4Grzegorz Jaśkiewicz
gryzman@gmail.com
In reply to: Devrim GÜNDÜZ (#3)
Re: tracking down a warning

On Wed, Nov 19, 2008 at 3:51 PM, Devrim GÜNDÜZ <devrim@gunduz.org> wrote:

On Wed, 2008-11-19 at 13:54 +0000, Grzegorz Jaśkiewicz wrote:

change loging level to debug1 in postgresql.conf, it will log
statements.

Why not just setting log_statement to all? (or whatever)

there's probably more ways to do the same thing :)

--
GJ

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Devrim GÜNDÜZ (#3)
Re: tracking down a warning

Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= <devrim@gunduz.org> writes:

On Wed, 2008-11-19 at 13:54 +0000, Grzegorz Jaśkiewicz wrote:

change loging level to debug1 in postgresql.conf, it will log
statements.

Why not just setting log_statement to all? (or whatever)

I think the least verbose way to find it would be to set
log_min_error_statement to "warning". With either of the above
you'd get lots of useless log traffic about non-problematic statements.

regards, tom lane