Re: Timezone for %t log_line_prefix

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Timezone for %t log_line_prefix
Date: 2004-08-05 02:25:48
Message-ID: 13166.1091672748@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Pflug <pgadmin(at)pse-consulting(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-08-05 02:41:04 Re: Timezone for %t log_line_prefix
Previous Message Christopher Kings-Lynne 2004-08-05 01:32:42 Re: enforcing a join type