Re: efficient data reduction (and deduping)

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Alessandro Gagliardi" <alessandro(at)path(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: efficient data reduction (and deduping)
Date: 2012-03-01 20:12:02
Message-ID: 4F4F83B20200002500045D82@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Alessandro Gagliardi <alessandro(at)path(dot)com> wrote:

> All of our servers run in UTC specifically to avoid this sort of
> problem. It's kind of annoying actually, because we're a San
> Francisco company and so whenever I have to do daily analytics, I
> have to shift everything to Pacific. But in this case it's handy.

If that's working for you, you might just want to leave it alone;
but just so you know:

If you declare the column as TIMESTAMP WITH TIME ZONE, that it
stores the timestamp as UTC regardless of what your server's
definition of time zone is. (It doesn't actually store the time
zone -- it just normalizes the time into UTC for storage.) On
retrieval it shows that UTC moment in the local timezone. So, all
that work you're doing to switch the time zone info around would be
pretty automatic if you used the other type.

-Kevin

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Marti Raudsepp 2012-03-01 20:51:52 Re: Large insert and delete batches
Previous Message Claudio Freire 2012-03-01 19:44:22 Re: efficient data reduction (and deduping)