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-19 16:04:09 |
Message-ID: | BANLkTi=KervJQsaVqm_i8HYnz2PCJvBzUw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Apr 7, 2011 at 1:36 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> If you have the timezone configured to a non-default value in
>> postgresql.conf, and you comment it out and reload, it says:
>
>> LOG: parameter "TimeZone" removed from configuration file, reset to default
>
>> ...but at least when I tested it, it didn't actually appear to reset
>> it to the default.
>
> Hm, interesting. guc-file.l thinks this will fix it in such cases:
>
> /* Now we can re-apply the wired-in default */
> set_config_option(gconf->name, NULL, context, PGC_S_DEFAULT,
> GUC_ACTION_SET, true);
>
> but for variables where the powerup default is "do nothing just yet",
> that, um, does nothing just yet. The patch I just applied doesn't
> change this behavior. I suspect that this "re-apply" logic also fails
> for cases where the intended default derives from environment variables.
>
> Making this work as expected actually looks a bit nasty, because in the
> case where the config file entry was there at system bootup, we never
> did compute a state corresponding to its not being there. So it's not
> just a matter of rolling back to some prior state.
So I think you whacked this around some more to get a *somewhat* more
sensible behavior, but ISTM that the behavior here still not really
right. Should we select a timezone at startup time even if we don't
immediately need it, so that this can work correctly if we revert to
the default down the road?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2011-05-19 16:11:29 | Patch by request at pgcon |
Previous Message | Robert Haas | 2011-05-19 15:52:16 | Re: ts_rank |