Re: Timezone for %t log_line_prefix - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Timezone for %t log_line_prefix
Date
Msg-id 13166.1091672748@sss.pgh.pa.us
Whole thread Raw
In response to Re: Timezone for %t log_line_prefix  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: Timezone for %t log_line_prefix  ("Andrew Dunstan" <andrew@dunslane.net>)
Re: Timezone for %t log_line_prefix  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
Andreas Pflug <pgadmin@pse-consulting.de> writes:
> I don't have a problem with either way, but it appears desirable if 
> there would be a log_line_prefix option that gives identical result on 
> all systems.

Well, the Right Thing (TM) would be to use our src/timezone code instead
of the local C library.  The reason I didn't do that was that I thought
the log timestamps shouldn't be affected by whatever TimeZone happens to
be set in a particular backend.

Since we do have control over the timezone library now, one possible
answer is to extend the src/timezone API so that it's possible to
convert/format against more than a single timezone.  We could then
remember the zone setting inherited from the postmaster and always use
that when formatting timestamps for the log, while not changing the
behavior for operations at the SQL level.

However, this is probably a bit more work than is reasonable to
undertake right now, when we're already overdue for beta.  For the
moment I'm really thinking that we ought to just #ifdef out the %Z
on Windows, and plan to do something nicer in 8.1.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: enforcing a join type
Next
From: "Andrew Dunstan"
Date:
Subject: Re: Timezone for %t log_line_prefix