Re: [HACKERS] Inefficiency in recent pgtz patch - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: [HACKERS] Inefficiency in recent pgtz patch
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE6C75D0@algol.sollentuna.se
Whole thread Raw
Responses Re: [HACKERS] Inefficiency in recent pgtz patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
>> Do you agree that using a hashtable for it in general is a good idea
>> assuming this sideeffect is removed, though?
>
>I have no problem with the hashtable, only with preloading it with
>everything.  What I'd like to see is that the table inherited at fork()
>contains just the data for the default timezone.  (At least in the
>normal case where that setting hasn't been changed since postmaster
>start.)

Here's a patch doing this. Changes score_timezone not to use pg_tzset(),
and thus not loading all the zones in the cache. The actual timezone
being picked will be set using set_global_timezone() which in turn calls
pg_tzset() and loads it in the cache.


//Magnus

Attachment

pgsql-patches by date:

Previous
From: Qingqing Zhou
Date:
Subject: Re: psql: \d+ show tablespace of indices
Next
From: Qingqing Zhou
Date:
Subject: Re: Simplify Win32 Signaling code