PostgreSQL
: 9.4
FreeBSD
: 11.2
当我将TimeZone
参数设置为 时,在postgresql.conf
尝试localtime
启动 PostgreSQL 时收到以下错误。
service postgresql restart
<2022-06-02 11:18:27.612 EDT> LOG: invalid value for parameter "TimeZone": "localtime"
<2022-06-02 11:18:27.613 EDT> FATAL: configuration file "/usr/local/pgsql/data/postgresql.conf" contains errors
pg_ctl: could not start server
Examine the log output.
在我的搜索过程中,我发现这似乎表明 /etc/localtime 应该是一个符号链接。我的不是,所以我尝试将其更改为符号链接,但它仍然无法正常工作,因为我遇到了与上述相同的错误。
mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/America/Yellowknife
shutdown -r now
ls -la /etc/localtime
lrwxr-xr-x 1 root wheel 35 Jun 2 11:04 /etc/localtime -> /usr/share/zoneinfo/America/Yellowknife
是否可以TimeZone
开始localtime
工作FreeBSD
?
请注意,我还发现了这个讨论,其中提到了创建一个symlink
to /etc/localtime
in /usr/share/zoneinfo
。我也试过了,它没有工作,因为我仍然得到与上面相同的错误。
使用pg_config --configure
我看到它没有配置--with-system-tzdata
. 这是使用的要求localtime
吗?