Обсуждение: BUG #16118: subsequent to Postgres server 12.1 patch, database won't start

Поиск
Список
Период
Сортировка

BUG #16118: subsequent to Postgres server 12.1 patch, database won't start

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      16118
Logged by:          dan ducey
Email address:      ars.na6mg@gmail.com
PostgreSQL version: 12.1
Operating system:   FreeBSD 12.1
Description:

$ pg_ctl -D data12 start
waiting for server to start....2019-11-15 19:02:46.630 GMT [77092] LOG:
invalid value for parameter "log_timezone": "US/Pacific"
2019-11-15 19:02:46.630 GMT [77092] LOG:  invalid value for parameter
"TimeZone": "US/Pacific"
2019-11-15 19:02:46.630 GMT [77092] FATAL:  configuration file
"/var/db/postgres/data12/postgresql.conf" contains errors
 stopped waiting
pg_ctl: could not start server
Examine the log output.

Edited postgresql.conf and commented-out: log_timezone = 'US/Pacific' and
timezone = 'US/Pacific' to enable successful startup.  The postgresql.conf
file worked with postgresql-server-12.0


Re: BUG #16118: subsequent to Postgres server 12.1 patch, database won't start

От
Tom Lane
Дата:
PG Bug reporting form <noreply@postgresql.org> writes:
> $ pg_ctl -D data12 start
> waiting for server to start....2019-11-15 19:02:46.630 GMT [77092] LOG:
> invalid value for parameter "log_timezone": "US/Pacific"
> 2019-11-15 19:02:46.630 GMT [77092] LOG:  invalid value for parameter
> "TimeZone": "US/Pacific"

Hm.  Setting timezone to 'US/Pacific' still works fine for me;
this must have been an external change.

Seeing that you're on FreeBSD ... I believe that the FreeBSD
postgresql package maintainer switched that package to use FreeBSD's
standard timezone database instead of the one shipped with Postgres,
as of 12.1 [1].  And a quick look into /usr/share/zoneinfo on a nearby
FreeBSD box shows that it's got a much more limited set of zone names
than an IANA-standard timezone database:

$ ls /usr/share/zoneinfo/
Africa/         Australia/      Etc/            MST             WET
America/        CET             Europe/         MST7MDT         posixrules
Antarctica/     CST6CDT         Factory         PST8PDT         zone.tab
Arctic/         EET             HST             Pacific/
Asia/           EST             Indian/         SystemV/
Atlantic/       EST5EDT         MET             UTC

For comparison, a nearby RHEL machine has

$ ls /usr/share/zoneinfo/
Africa/      Canada/  GB         Indian/    Mexico/   ROK        iso3166.tab
America/     Chile/   GB-Eire    Iran       NZ        Singapore  leapseconds
Antarctica/  Cuba     GMT        Israel     NZ-CHAT   Turkey     posix/
Arctic/      EET      GMT+0      Jamaica    Navajo    UCT        posixrules
Asia/        EST      GMT-0      Japan      PRC       US/        right/
Atlantic/    EST5EDT  GMT0       Kwajalein  PST8PDT   UTC        tzdata.zi
Australia/   Egypt    Greenwich  Libya      Pacific/  Universal  zone.tab
Brazil/      Eire     HST        MET        Poland    W-SU       zone1970.tab
CET          Etc/     Hongkong   MST        Portugal  WET
CST6CDT      Europe/  Iceland    MST7MDT    ROC       Zulu

which I believe is an unmodified copy of the IANA data.

So really your question ought to be directed to whoever packages
tzdata for FreeBSD, and it is "why don't they ship the full IANA
zone set?"  But in the meantime, it looks like America/Los_Angeles
should work for you.

            regards, tom lane

[1]
https://www.postgresql.org/message-id/flat/E8B887D2-D5A8-4217-ADD6-A7AC0BDF8750%40pingpong.net#d457095d20f86a63ade61efa39a002c4