Re: Win32 timezone matching - Mailing list pgsql-hackers

From Stefan Kaltenbrunner
Subject Re: Win32 timezone matching
Date
Msg-id 4BBCB0D9.5080001@kaltenbrunner.cc
Whole thread Raw
In response to Re: Win32 timezone matching  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Win32 timezone matching  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Tom Lane wrote:
> Stefan Kaltenbrunner <stefan@kaltenbrunner.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Win32 timezone matching
Next
From: Josh Berkus
Date:
Subject: Re: Thoughts on pg_hba.conf rejection