Re: Add support for logging the current role

Itagaki Takahiro <itagaki.takahiro@gmail.com>

From: Itagaki Takahiro <itagaki.takahiro@gmail.com>
To: Stephen Frost <sfrost@snowman.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-02-06T15:13:53Z
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 →
  1. Add support for an application_name parameter, which is displayed in

  2. Make CSV column ordering a bit more logical.

  3. Extend the format of CSV logs to include the additional information supplied

  4. Add virtual transaction IDs to CSVLOG output, so that messages coming from

  5. Provide for logfiles in machine readable CSV format. In consequence, rename

On Sun, Feb 6, 2011 at 23:31, Stephen Frost <sfrost@snowman.net> wrote:
> * Itagaki Takahiro (itagaki.takahiro@gmail.com) wrote:
>> I think we need to improve postgresql.conf.sample a bit more, especially
>> the long line for #log_csv_fields = '...'. 330 characters in it!
>>   #1. Leave the long line because it is needed.
> It's needed to match what the current default is..

I agree that it's logically good design, but we could not accept it
as long as it breaks tools in the real world...
Will it break "SHOW ALL" and "SELECT * FROM pg_settings" output?
I'm worried that they are not designed to display such a long value.

>> I think it depends default log filename, that contains %S (seconds)
>> suffix. We can remove %S from log_filename; if we use a log per-day,
>> those log might contain different columns even after restart. If we
>> cannot avoid zigged csv fields completely, SIGHUP seems reasonable for it.
>
> This problem is bigger than SIGHUP, but at least with a restart
> required, the default will work properly.  The default configuration
> wouldn't work w/ a change to the log line and a SIGHUP done.

"Only works with the default settings" is just wrong design.
If we cannot provide a perfect solution, we should allow users to
control everything as they like. I still think PGC_SIGHUP is the
best mode for the parameter, with a note of caution in the docs.

-- 
Itagaki Takahiro