Re: Floating-point timestamps versus Range Types

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Floating-point timestamps versus Range Types
Date: 2010-10-21 23:49:54
Message-ID: 201010212349.o9LNnsC18928@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Mon, Oct 18, 2010 at 2:29 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> > A reasonable conversion path might be to offer integer timestamps using
> > a different type name (e.g. inttimestamp) that always means integer
> > timestamps. Then, they could convert using ALTER TABLE, then do an
> > in-place upgrade. We could even make pg_upgrade optionally convert
> > inttimestamp to timestamp in O(1) on an integer-timestamps build.
>
> I think in retrospect it would certainly have been better to make
> integer timestamps and float timestamps two separate data types,
> rather than two versions of the same data type. Whether it's worth
> providing that now after the fact is not clear to me. I'd be inclined
> to wait and see whether we get many complaints...
>
> One problem with changing types in pg_upgrade is that type OIDs can
> get embedded in the on-disk representation - I believe that this
> happens for arrays, for instance. So I think it's practical for
> pg_upgrade to change type names during a version upgrade, but not type
> OIDs.

One thing we have talked about is converting the page on read-in from
the backend. Since the timestamps are the same size as float or
integer, that might be possible.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2010-10-21 23:55:01 Re: Floating-point timestamps versus Range Types
Previous Message Kevin Grittner 2010-10-21 23:33:12 Re: Serializable snapshot isolation patch