When logging long queries we get a DETAIL record with the query parameters, like this:
2012-05-17 08:33:33 CDT [15053]: [1-1] user@database x.x.x.x(35559)LOG: 00000: duration: 587.476 ms execute dbdpg_p15947_158: select a_bunch_of_stuff from table_b where id = $1 and ........
2012-05-17 08:33:33 CDT [15053]: [2-1] user@database x.x.x.x(35559)DETAIL: parameters: $1 = '302241'
2012-05-17 08:33:33 CDT [15053]: [3-1] user@database x.x.x.x(35559)LOCATION: exec_execute_message, postgres.c:2023
but the untranslatable character error is not showing a DETAIL record:
2012-05-17 09:11:42 CDT [27225]: [1-1] user@database2 x.x.x.x(34225)ERROR: 22P05: character 0xe28093 of encoding "UTF8" has no equivalent in "LATIN1"
2012-05-17 09:11:42 CDT [27225]: [2-1] user@database2 x.x.x.x(34225)LOCATION: report_untranslatable_char, wchar.c:1643
2012-05-17 09:11:42 CDT [27225]: [3-1] user@database2 x.x.x.x(34225)STATEMENT: select * from table_a where id = $1
The query parameters would be helpful in tracking down the record that has the bad data. Are there separate parameter settings for these, or are we possibly missing something else? We have log_min_error_statement = warning. This is 9.1.3 These are two separate databases running on the same server (postgresql instance).
__________________________________________________________________________________
Mike Blackwell | Technical Analyst, Distribution Services/Rollout Management | RR Donnelley
1750 Wallace Ave | St Charles, IL 60174-3401
Office: 630.313.7818
Mike.Blackwell@rrd.com
http://www.rrdonnelley.com