Re: efficient data reduction (and deduping) - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: efficient data reduction (and deduping)
Date
Msg-id 4F4F83B20200002500045D82@gw.wicourts.gov
Whole thread Raw
In response to Re: efficient data reduction (and deduping)  (Alessandro Gagliardi <alessandro@path.com>)
List pgsql-performance
Alessandro Gagliardi <alessandro@path.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

pgsql-performance by date:

Previous
From: Alessandro Gagliardi
Date:
Subject: Re: efficient data reduction (and deduping)
Next
From: Marti Raudsepp
Date:
Subject: Re: Large insert and delete batches