Skip site navigation (1) Skip section navigation (2)

Re: timezone GUC

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: timezone GUC
Date: 2011-05-23 01:00:59
Message-ID: BANLkTikqoSgR3LkFZehK_bd5cgPq=k=Mwg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, May 19, 2011 at 12:19 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Thu, May 19, 2011 at 12:12 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> We could do that, but the issue that this code is trying to avoid is
>>> that identify_system_timezone can easily add several seconds to the
>>> postmaster startup time.  So one of the reasons why someone would be
>>> putting a timezone setting into postgresql.conf in the first place is
>>> to not pay that startup overhead.  I'm not thrilled with the idea
>>> of defeating that in order to cover the corner case where they remove
>>> the setting later.
>
>> Yeah, I'm not thrilled with that either.  However, I'm also not
>> thrilled with the existing behavior.  Consistency is the hobgoblin of
>> small minds, and also mine.
>
> What would make everybody happy is to find a way of identifying the
> system timezone that isn't such a massive, expensive kluge.  Any ideas?

...reads the code...

Good grief.  What an incredibly ugly hack.  Is there seriously no
portable way of doing this?

If not, then how about jiggering things somehow so that only one
server process needs to run the hack?  Perhaps it can drop the result
in a file or shared memory or something from which the remaining
backends can read it out without having to redo all that work?
Admittedly there is a synchronization problem there I'm not quite sure
how to solve.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-05-23 01:39:38
Subject: Re: [BUGS] BUG #6034: pg_upgrade fails when it should not.
Previous:From: Tim UckunDate: 2011-05-22 23:48:28
Subject: BUG #6034: pg_upgrade fails when it should not.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group