PG < 16.4 pg_timezone_names seems broken

Hi,

I’m running metabase on k8s using https://unagex.github.io/metabase-operator and noticed something weird when I go above PG 16.4. Seems pg_timezone_names doesn’t have US/Pacific.

Here are my PG logs

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
waiting for server to start....2025-08-18 16:57:42.750 UTC [56] LOG: starting PostgreSQL 16.10 (Debian 16.10-1.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2025-08-18 16:57:42.752 UTC [56] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-08-18 16:57:42.759 UTC [59] LOG: database system was shut down at 2025-08-18 16:57:42 UTC
2025-08-18 16:57:42.764 UTC [56] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
waiting for server to shut down...2025-08-18 16:57:42.949 UTC [56] LOG: received fast shutdown request
.2025-08-18 16:57:42.952 UTC [56] LOG: aborting any active transactions
2025-08-18 16:57:42.953 UTC [56] LOG: background worker "logical replication launcher" (PID 62) exited with exit code 1
2025-08-18 16:57:42.954 UTC [57] LOG: shutting down
2025-08-18 16:57:42.956 UTC [57] LOG: checkpoint starting: shutdown immediate
2025-08-18 16:57:43.032 UTC [57] LOG: checkpoint complete: wrote 926 buffers (5.7%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.064 s, sync=0.006 s, total=0.078 s; sync files=301, longest=0.002 s, average=0.001 s; distance=4273 kB, estimate=4273 kB; lsn=0/191F0D8, redo lsn=0/191F0D8
2025-08-18 16:57:43.037 UTC [56] LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
2025-08-18 16:57:43.069 UTC [1] LOG: starting PostgreSQL 16.10 (Debian 16.10-1.pgdg13+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 14.2.0-19) 14.2.0, 64-bit
2025-08-18 16:57:43.069 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-08-18 16:57:43.069 UTC [1] LOG: listening on IPv6 address "::", port 5432
2025-08-18 16:57:43.073 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-08-18 16:57:43.080 UTC [72] LOG: database system was shut down at 2025-08-18 16:57:43 UTC
2025-08-18 16:57:43.085 UTC [1] LOG: database system is ready to accept connections
2025-08-18 16:57:44.050 UTC [86] FATAL: invalid value for parameter "TimeZone": "US/Pacific"
2025-08-18 16:57:44.057 UTC [84] FATAL: invalid value for parameter "TimeZone": "US/Pacific"
2025-08-18 16:57:44.062 UTC [85] FATAL: invalid value for parameter "TimeZone": "US/Pacific"
2025-08-18 16:57:44.102 UTC [87] FATAL: invalid value for parameter "TimeZone": "US/Pacific"

Could anyone confirm that they can get metabase to work with higher PG versions than 16.4?

Its possible the image you are using (or are building if you’re building your own image) is missing the time zone files. They usually ship with PostgreSQL but its possible someone accidentally disabled them in whatever build or image you are using.

The test is to connect to the database using another tool (psql, dBeaver, PgAdmin, etc.) and look at the pg_timezone_names view. There should be ~600 rows in it. If it seems like they’re all missing, then that’s your problem.

There are updates for the zone data that ships with PostgreSQL in 16.5 and 16.9.

If just the US/ ones are missing, but the America/ ones are there, you could work around it by setting the Metabase instance timezone to the appropriate America/ name. US/Pacific would map to America/Los_Angeles.

Since I’m using the operator https://unagex.github.io/metabase-operator I don’t have means of changing much before the initial startup is done and in this case the startup fails because of the changes made to PG post 16.4.

That page is 404, by the way.

I’d raise a case with the metabase-operator project, though the last release was February 2024, so it might be getting stale.

This is the page. GitHub - unagex/metabase-operator: Unagex Kubernetes Operator for Metabase

The problem is that the metabase project expects a time zone that is not available > PG 16.4.

Overriding that on boot seems like a bad practice.

I don’t know why the US/ prefixed time zones would be missing. They’re there on my PG 17.6 install. I’m not running from a container, though.

I saw nothing in the PG release notes that said any timezones were accidentally omitted.

=> select version();
                                        version                                         
────────────────────────────────────────────────────────────────────────────────────────
 PostgreSQL 17.6 on amd64-portbld-freebsd14.2, compiled by clang version 19.1.7, 64-bit
(1 row)
  
=> select * from pg_timezone_names where name ^@ 'US/';
       name        │ abbrev │ utc_offset │ is_dst 
───────────────────┼────────┼────────────┼────────
 US/Mountain       │ MDT    │ -06:00:00  │ t
 US/Samoa          │ SST    │ -11:00:00  │ f
 US/Alaska         │ AKDT   │ -08:00:00  │ t
 US/Pacific        │ PDT    │ -07:00:00  │ t
 US/Central        │ CDT    │ -05:00:00  │ t
 US/Hawaii         │ HST    │ -10:00:00  │ f
 US/Arizona        │ MST    │ -07:00:00  │ f
 US/Michigan       │ EDT    │ -04:00:00  │ t
 US/East-Indiana   │ EDT    │ -04:00:00  │ t
 US/Aleutian       │ HDT    │ -09:00:00  │ t
 US/Indiana-Starke │ CDT    │ -05:00:00  │ t
 US/Eastern        │ EDT    │ -04:00:00  │ t
(12 rows)

Interesting. I must admit I didn’t do extensive research into it. Only that the versions after 16.4 were failing for me. Could very much be something wrong with the PG containers I pulled.