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>, Andrew Dunstan <andrew@dunslane.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-01-15T02:51:44Z
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: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> A user-settable column list seems pretty on-target >> for solving those problems to me. > I'm looking into implementing this. > An interesting initial question is- should the users be able to control > the *order* of the columns? My gut feeling, if we're giving them a GUC > that's a list of fields, is 'yes', but I'm happy to listen to other > thoughts. Yeah, I was just thinking about that in connection with the suggestion of using a bitmap as the pre-parsed representation (which would more or less force adoption of the fixed-column-order approach). I really think we can't get away with that. Remember what Andrew pointed out upthread: it's important to be able to load the csvlog output directly into a table without any extra processing. Suppose a DBA is logging columns A,B,D and he later realizes that logging C would be a good thing too. He's going to have to ALTER TABLE ADD COLUMN to add C to his logging table ... and now it's at the end. This is no problem if he can set the GUC to be "A,B,D,C" and have the field order be honored. Otherwise he's got a problem. In any case, if the GUC representation is a list of field names, I think the POLA demands that the system honor the list order. You could escape that expectation by controlling the feature with a pile of booleans (csv_log_pid = on, csv_log_timestamp = off, etc) but I can't say that that sort of API appeals to me. BTW, in case you didn't know, there are some GUCs defined as lists of identifiers already (look for GUC_LIST bits). Be sure to steal code. regards, tom lane