log_timezone = UTC (charm default) is invalid on xenial

Bug #1580331 reported by Greg Lutostanski on 2016-05-10
This bug report is a duplicate of:  Bug #1543025: Wrong UTC zoneinfo in cloud-images. Edit Remove
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
PostgreSQL Charm
High
Stuart Bishop
postgresql (Ubuntu)
Undecided
Unassigned

Bug Description

the log_timezone = UTC which worked on precise/trusty causes an error...
http://pastebin.ubuntu.com/16352350/

it is in /usr/share/zoneinfo/UTC (but as a symlink, maybe that's the issue?)

either way I set it to GMT which worked fine.

my workaround
ubuntu@xenialmojo:~$ juju set ci-oil-postgresql extra_pg_conf="# Additional service specific postgresql.conf settings.
listen_addresses='*'
ssl=true
log_checkpoints=true
log_connections=true
log_disconnections=true
log_autovacuum_min_duration=-1
log_line_prefix='%t [%p]: [%l-1] db=%d,user=%u '
archive_mode=on
archive_command='/bin/true'
hot_standby=true
max_wal_senders=80
# max_wal_senders=num_units * 2 + 5
# wal_level=hot_standby (<9.4) or logical (>=9.4)
# shared_buffers=total_ram*0.25
# effective_cache_size=total_ram*0.75
default_statistics_target=250
from_collapse_limit=16
join_collapse_limit=16
wal_buffers=-1
checkpoint_completion_target=0.9
password_encryption=true
max_connections=100
log_timezone = GMT"

tags: added: oil
Stuart Bishop (stub) on 2016-05-11
Changed in postgresql-charm:
status: New → Triaged
importance: Undecided → High
Greg Lutostanski (lutostag) wrote :

Yep, its the symlink thing..., dunno why postgres can't deal with them, seems very strange.

precise/trusty
GMT -> Greenwich
Zulu -> UTC

xenial
Greenwich -> GMT
UTC -> Zulu

So there is neither default which will work across the series... bummer.
http://<email address hidden> says it should default to UTC if not specified, but that's for internal db timestamps, not sure for logging.

http://stackoverflow.com/questions/26049242/postgresql-error-timezone-directory-stack-overflow also mentions to check whether it was compiled with the --with-system-tzdata flag, but dunno what the debbuild does.

Stuart Bishop (stub) wrote :

I cannot reproduce this locally. I have reproduced it on OpenStack.

Stuart Bishop (stub) wrote :

postgres=# select * from pg_timezone_abbrevs;
ERROR: time zone abbreviation "novst" is not used in time zone "Asia/Novosibirsk"

Querying the pg_timezone_names table works fine.

Looks like the ubuntu packages have bad integration with the system timezone database.

tags: added: regression
Stuart Bishop (stub) wrote :

Worked around in the charm by removing the log_timezone default from the charm config.

Changed in postgresql-charm:
status: Triaged → Fix Released
assignee: nobody → Stuart Bishop (stub)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in postgresql (Ubuntu):
status: New → Confirmed
Martin Pitt (pitti) wrote :

I'm 99% sure that this is due to the cloud-init bug which messed up "UTC", in bug 1543025. Marking as a duplicate. If this still happens with current cloud images, please undup again.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers