We're logging slow running queries in PG (on AWS RDS) with log_min_duration_statement
along with log_error_verbosity
= default
so we get DETAIL lines, because our app's libraries uses prepared statements under the covers. We are using log_destination = stderr
-- we can't use csvlog
in this case.
What we end up with though are two disparate log lines:
LOG: duration: 1680.110 ms execute <unnamed>: SELECT.... = $1
DETAIL: parameters: $1 = 'foo'
These are two distinct log lines in the log file.
Is there any combination of settings that either (a) can combine these in a single line, so we get both the LOG and the DETAIL in the same message, or (b) is there some ID that can be used to correlate these two messages together?