postgresql timezone and OS localtime correspondence

From: Pavel Suderevsky <psuderevsky(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: postgresql timezone and OS localtime correspondence
Date: 2016-03-21 12:20:28
Message-ID: CAEBTBzvXBnx9whGrby4Lv2GRb7e3bXSxoe1mPQpu=VSxsz=M6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

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.

Mar 21 10:55:50 dbtest3.local pg_ctl[11242]: 2016-03-21 05:55:50 EST LOG:
> invalid value for parameter "TimeZone": "localtime"
> [root(at)dbtest3 ~]# ls -la /etc/localtime
>
> lrwxrwxrwx. 1 root root 23 Mar 21 12:10 /etc/localtime ->
> /usr/share/zoneinfo/GMT

I couldn't find information related to difference between debian and red
hat family systems for timezone parameter in docs.

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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-03-21 13:37:44 Re: [GENERAL] OS X 10.11.3, psql, bus error 10, 9.5.1
Previous Message Alexey.I.Larin@gmail.com 2016-03-21 08:31:40 pglogical two way replication problem