[pgpool-general: 2113] possible timezone handling issue

Sean Hogan sean at compusult.net
Wed Sep 11 01:47:43 JST 2013


Hi,

I happen to live in a 30 minute time zone (GMT-2:30 at the moment). 
Today I got a user report complaining that when they insert 
current_timestamp into a "timestamp with time zone" column, the column 
ends up containing a time that is 30 minutes too early (but with the 
correct timezone).

$ psql -h psql-vip -U postgres
postgres=# create table t1 (tm timestamp with time zone);
CREATE TABLE
postgres=# insert into t1 (tm) values (current_timestamp);
INSERT 0 1
postgres=# select * from t1;
                 tm
----------------------------------
  2013-09-10 13:41:05.648345-02:30
(1 row)

$ date
Tue Sep 10 14:08:13 NDT 2013

If I do the exact same test against the real PostgreSQL backend, the 
column contains the correct time:

$ psql -h psql-vm1 -p 5433 -U postgres
postgres=# create table t2 (tm timestamp with time zone);
CREATE TABLE
postgres=# insert into t2 (tm) values (current_timestamp);
INSERT 0 1
postgres=# select * from t2;
                 tm
----------------------------------
  2013-09-10 14:15:34.205086-02:30
(1 row)

$ date
Tue Sep 10 14:15:39 NDT 2013


Does pgpool-II have a limitation in this area?  It's an enormous problem 
for me because our application's scheduler records activity times this way.

Thanks,
Sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sean.vcf
Type: text/x-vcard
Size: 275 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20130910/fa53359a/attachment.vcf>


More information about the pgpool-general mailing list