From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Tony Caduto" <tony_caduto(at)amsoftwaredesign(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: 8.04 and RedHat/CentOS init script issue and sleep |
Date: | 2005-10-21 08:01:03 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE6C7AE6@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > I'm not actually particularly worried about the startup
> time. What's
> > bothering me right at the moment, given the new-found knowledge that
> > strftime() is slow on Linux, is that we're using it in
> elog(). At the
> > time that code was written, we did it deliberately to
> ensure that all
> > the backends would write log timestamps in the same timezone
> > regardless of local SET TimeZone commands. That's still an
> important
> > consideration, but I wonder whether we don't now have
> enough timezone
> > infrastructure that we could get the same results using pg_strftime.
>
> If glibc fixes the problem upstream then we can leave well
> enough alone, but if they indicate they won't then we should
That'll take quite a while to trickle down into the distributions even
if it's fixed, won't it? If the fix is simple, we should perhaps
consider it anyway.
> think about doing this someday. The major problem with it
> probably is "what do you do when messages need to be emitted
> before pgtz has been initialized?"
Shouldn't be too hard, I think. If we declare a "pg_tz* system_timezone"
or so, and initialize it to NULL. Once pgtz is initialized we assign a
valid timezone to it, being the startup timezone. Then in elog, we
simply check if system_timezone is null and then fallback on the glibc
version of strftime.
It shouldn't be a performance issue if it fails that often, because we
won't call elog a whole lot of times there, right?
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Wilkin, Kurt | 2005-10-21 11:03:23 | Re: [GENERAL] 'a' == 'a ' |
Previous Message | Qingqing Zhou | 2005-10-21 06:39:26 | Win32 CHECK_FOR_INTERRUPTS() performance tweak |