From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Pavel Suderevsky <psuderevsky(at)gmail(dot)com> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: postgresql timezone and OS localtime correspondence |
Date: | 2016-03-21 18:03:17 |
Message-ID: | 26280.1458583397@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Pavel Suderevsky <psuderevsky(at)gmail(dot)com> writes:
> My question is related to correspondence of postgresql "timezone" parameter
> with OS timezone settings in debian and red hat family systems.
> In debian by default postgresql "timezone" parameter value is "localtime"
> and it succesfully gets current OS timezone. (most probably it is not
> dynamically updated and with changing OS timezone postgresql to be
> restarted likewise, but still)
> In centos 7.2 postgresql doesn't accept "localtime" value and timezone must
> be specified directly.
The reason that happens is that Debian creates a symlink named "localtime"
within the timezone data file tree (probably via zic's -l option, though
maybe they do it by hand). Red Hat doesn't do that; they follow a
different historical convention in which /etc/localtime defines the system
default zone. Arguably, "zic -l" is a violation of filesystem layout
conventions, since it puts what ought to be system-specific configuration
data into /usr/share.
> So the common question is: is there a way to configure postgresql server to
> get OS localtime value rather than setting it manually in red hat family
> systems?
You could make your own symlink, though I'm unsure whether it'd survive
tzdata package updates.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2016-03-21 18:09:02 | Re: Request - repeat value of \pset title during \watch interations |
Previous Message | Chris Spencer | 2016-03-21 17:55:12 | Slow GIN indexes after bulk insert |