From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Fix for log_line_prefix and session display |
Date: | 2012-10-12 18:51:27 |
Message-ID: | 20121012185127.GB31038@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Currently, our session id, displayed by log_line_prefix and CSV output,
is made up of the session start time epoch seconds and the process id.
The problem is that the printf mask is currently %lx.%x, causing a
process id less than 4096 to not display a full four hex digits after
the decimal point. I think this is confusing because the number .423
appears higher than .1423, though it is not. Here is what our current
output looks like with log_line_prefix="%c: ":
50785b3e.7ff9: ERROR: syntax error at or near "test" at character 1
50785b3e.7ff9: STATEMENT: test
50785b3e.144: ERROR: syntax error at or near "test" at character 1
50785b3e.144: STATEMENT: test
With my fix, here is the updated output:
507864d3.7ff2: ERROR: syntax error at or near "test" at character 1
507864d3.7ff2: STATEMENT: test
507864d3.013d: ERROR: syntax error at or near "test" at character 1
507864d3.013d: STATEMENT: test
Patch attached.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
Attachment | Content-Type | Size |
---|---|---|
prefix.diff | text/x-diff | 1.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Darren Duncan | 2012-10-12 18:57:23 | Re: Deprecating RULES |
Previous Message | Tom Lane | 2012-10-12 18:48:46 | Re: dumping recursive views broken in master |