Re: Log line prefix on win32

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paesold <mpaesold(at)gmx(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Log line prefix on win32
Date: 2004-10-08 17:38:06
Message-ID: 200410081738.i98Hc6Z21867@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I was thinking of adding %z as an option to log_line prefix, so to get
> > the current output you would do '%t %z'. I was not suggesting changing
> > the %Z passed to strftime if they ask for timezone.
>
> I think this is a bad idea, mainly because you couldn't easily get the
> same output. It would be almost the same, except when you crossed a DST
> boundary in between the two calls to strftime; in which case you'd get a
> completely misleading result.
>
> I believe that in the long run we will stop using the platform-specific
> strftime at all, and go over to using just our own code, which makes
> this not a permanent problem but just an artifact of the fact that we
> haven't completely finished the process of absorbing src/timezone/.
> So I'd rather not invent an API element simply because Windows' strftime
> sucks.

Agreed, and the daylight savings time is a good reason to keep the
timezone.

However, I actually prefer the mail header style of timezone to EST/EDT
anyway:

Fri, 08 Oct 2004 12:37:52 -0400

Ours would change from:

2004-10-08 11:29:30 EDT LOG: database system was shut down at
to
2004-10-08 11:29:30 -0400 LOG: database system was shut down at

Is that better?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2004-10-08 17:40:08 Re: Log line prefix on win32
Previous Message Josh Berkus 2004-10-08 17:18:27 Re: plans for bitmap indexes?

Browse pgsql-patches by date

  From Date Subject
Next Message Andreas Pflug 2004-10-08 17:40:08 Re: Log line prefix on win32
Previous Message Tom Lane 2004-10-08 17:13:09 Re: Log line prefix on win32