Re: Add support for logging the current role
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Robert Haas <robertmhaas@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-01-13T01:16:12Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add support for an application_name parameter, which is displayed in
- 8217cfbd9918 9.0.0 cited
-
Make CSV column ordering a bit more logical.
- 230e8962f3a4 8.3.0 cited
-
Extend the format of CSV logs to include the additional information supplied
- 3bf66d6f1c3a 8.3.0 cited
-
Add virtual transaction IDs to CSVLOG output, so that messages coming from
- 77c166ba6cf6 8.3.0 cited
-
Provide for logfiles in machine readable CSV format. In consequence, rename
- fd801f4faa8e 8.3.0 cited
Stephen Frost <sfrost@snowman.net> writes: > * Robert Haas (robertmhaas@gmail.com) wrote: >> Interesting. I wonder if we shouldn't try to fix this by including >> the relevant role name in the error message. Or is that just going to >> be too messy to live? > It might be possible to do and answer that specific question- but what > about the obvious next question: which role was this command run with? > iow, if I log dml, how do I know what the role was when the dml > statement was run? ie- why was this command allowed? I'm less than excited about that argument because it's after the fact --- if you needed to know the information, you probably didn't have log_line_prefix set correctly, even assuming you had adequate logging otherwise. And logging an OID just seems too ugly to live. Another little problem with the quick and dirty solution is that stuff that's important enough to warrant a log_line_prefix escape is generally thought to be important enough to warrant inclusion in CSV logs. That would imply adding a column and taking the resultant compatibility hit. regards, tom lane