Re: timezone GUC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: timezone GUC
Date: 2011-04-07 05:36:22
Message-ID: 4991.1302154582@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2011-04-07 06:07:32 Failed assert ((data - start) == data_size) in heaptuple.c
Previous Message Andrew Dunstan 2011-04-07 04:49:02 Re: superusers are members of all roles?