Re: Win32 timezone matching

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Win32 timezone matching
Date: 2010-04-07 16:20:41
Message-ID: 4BBCB0D9.5080001@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
>> hmm all that code makes me wonder a bit about a more general issue - is
>> the "fallback to GMT if we fail to actually make sense of the right
>> imezone to use" actually a good idea?
>
> What alternative are you proposing? Failing to start the server doesn't
> seem like an attractive choice.

why not? we do error out in a lot of other cases as well... Personally I
find a hard and clear "something is wrong please fix" much more
convinient than defaulting to something that is more or less completely
arbitrary but well...

>
>> I would consider the failure to make sense of the registry on windows or
>> failure to figure timezone information out a more serious issue than a
>> mere "WARNING" because depending on how you look at the issue it might
>> actually cause silent data corruption.
>
> Somehow, if you're running a database on windoze, I doubt your data
> integrity standards are that high. In any case I'd rather get a bleat
> about "why is the server running in GMT" than "my database won't start".
> The former will be a lot easier to narrow down.

heh - except that we fail in that department - The only (not really
useful hint) that pg logged was:

"WARNUNG: could not query value for 'std' to identify Windows timezone: 2"

which says nothing about "I failed to figure something sane out and so I
have to fallback to GMT" (which is what the !WIN32 code path seems to be
actually doing but not the WIN32 code).
And even from the vendor perspective getting a support call on "uhm the
database for your app is not starting what logs should I look at" seems
better than "hmm we are now 2 weeks in production and just noticed that
all the timestamps are off by a few hours how can we fix our data?".
PostgreSQL is bundled with a lot of apps on windows these days so the
enduser might not even aware of it (and look into the eventlog only to
find a rather oddly phrased WARNING) unless it fails hard...

Stefan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-04-07 16:53:35 Re: Thoughts on pg_hba.conf rejection
Previous Message Heikki Linnakangas 2010-04-07 16:14:18 Re: pgsql: Forbid using pg_xlogfile_name() and pg_xlogfile_name_offset()