Re: add support for logging current role (what to review?)

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Alex Hunsaker <badalex(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: add support for logging current role (what to review?)
Date: 2011-07-01 05:53:53
Message-ID: BANLkTinMH2+aM2dzYv_svdk0NDjeX==V7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 1, 2011 at 03:36, Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Stephen Frost's message of jue jun 30 18:35:40 -0400 2011:
>
>> > I know of no such list, and I think this field
>> > useful/important enough that people who are using csv logging would
>> > want it anyway. +1 on just tacking on the field and causing a flag day
>> > for csv users.
>>
>> Honestly, I think it was *me* who raised the issue that we don't have a
>> header for CSV logs and that it sucks for people using CSV files.  We've
>> changed it in the past (application_name was added, iirc) and there
>> wasn't much noise of it that I recall.  If everyone's happy with that,
>> it's fine by me.
>
> I don't understand why it is so much a deal that 9.1 has a different CSV
> table definition than 9.0 anyway (or any two release combination).  As
> long as both are clearly and correctly documented in the respective
> pages, it shouldn't be an issue at all.  If anyone attempts to load CSV
> log files into the wrong table definition, the problem should make
> itself evident pretty quickly.

I don't see that as a big problem either. A file header would make it
easier to detect for tools though - either by a regular CSV header or
by just always logging a row with the version number in the first line
of each file. Making it an actual CSV header has the added benefit of
being a standard way that non-pg-specific tools know how to deal
with..

If it's a pg specific tool, it's likely going to require version
specific information anyway. This is just one of them. Now, if the
order and ocntents of the fields is made entirely configurable, that
basically creates an unlimited number of permutations, and *that* may
make things really hard on tool developers. And without a header, it
makes the tool developers work completely impossible - but harder even
with.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2011-07-01 05:54:48 Re: PANIC while doing failover (streaming replication)
Previous Message Jeff Davis 2011-07-01 05:52:39 Re: Range Types, constructors, and the type system