Re: Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST" - Mailing list pgsql-jdbc

From David Wall
Subject Re: Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST"
Date
Msg-id 538AD3B3.9060909@computer.org
Whole thread Raw
In response to Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST"  (David Wall <d.wall@computer.org>)
Responses Re: Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-jdbc
On 5/31/2014 11:41 PM, David Wall wrote:
> I am posting to both PG and the JDBC group since I am using JDBC to
> connect, so I'm not sure if this is a PG issue or a PG JDBC issue.
>
> I am upgrading from 8.3.3 to 9.3.4.  I ran pg_dump on my 8.3.3
> databases (which ran on CentOS 5.2, Java 6) and ran pg_restore on my
> 9.3.4 databases (which runs on CentOS 6.4, Java 7.0.55, using JDBC
> postgresql-9.3-1101.jdbc41.jar).  The new databases appear to be
> correct in that I can run psql and query my tables and I don't see any
> obvious issues.
>
> In fact, I seem to be able to run several applications at the same
> time, each connecting to its own database.
>
> But I also see that sometimes I get this error in my postgresql.log file:
>
>  FATAL:  invalid value for parameter "TimeZone": "PST"
>
> I normally run about 35-40 webapps at a time in our dev environment
> without issue, but when I try to start them all, it seems this error
> occurs on nearly every application.  Yet when I only run about 10, I
> don't seem to see the issue at all.  I have tried adding them in one
> at a time to see if there was a "rogue" webapp, but when I find a
> newly added one suffers the TimeZone FATAL error above, if I restart
> Tomcat, it may then be fine.  Apps that run okay at one time, will
> exhibit the error when I try to add the others in.
>
> Does anybody have any ideas on what I might try?  I did a 'yum update'
> to get the latest, rebooted, recompiled PG and reloaded the DBs, but
> that made no difference.
>
> Thanks for any tips if anybody has seen this!

Adding in case this helps JDBC:

PG itself has the timezone US/Pacific set in postgresql.conf

In Linux, we show:
lrwxrwxrwx 1 root root 39 Apr 23 16:00 /etc/localtime ->
/usr/share/zoneinfo/America/Los_Angeles

Even when we use PST in our Java code, we use PST8PDT.

The exception occurs when JDBC tries to connect to PG:

2014-05-31 22:14:34,351 ERROR (eSignForms) SQLException:
ConnectionPool.makeConnection(esf) to URL:
jdbc:postgresql://localhost.localdomain:25432/zingr:
2014-05-31 22:14:34,352 ERROR (eSignForms)   Message:   FATAL: invalid
value for parameter "TimeZone": "PST"
org.postgresql.util.PSQLException: FATAL: invalid value for parameter
"TimeZone": "PST"
         at
org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:574)
         at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:177)
         at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
         at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:138)
         at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:29)
         at
org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:21)
         at
org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:31)
         at
org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)
         at org.postgresql.Driver.makeConnection(Driver.java:410)
         at org.postgresql.Driver.connect(Driver.java:280)
         at java.sql.DriverManager.getConnection(DriverManager.java:571)
         at java.sql.DriverManager.getConnection(DriverManager.java:215)
         at
com.esignforms.db.ConnectionPool.makeConnection(ConnectionPool.java:302)

And of course none seems to explain why it works often enough, but then
fails as more apps are deployed.  Ugh!


pgsql-jdbc by date:

Previous
From: David Wall
Date:
Subject: Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST"
Next
From: Tom Lane
Date:
Subject: Re: Upgrading from PG 8.3.3 to 9.3.4 - FATAL: invalid value for parameter "TimeZone": "PST"