Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dXDh2-0001vQ-US for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Jul 2017 21:36:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dXDh2-000588-Gm for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Jul 2017 21:36:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dXDfW-0002PX-Dj for pgsql-hackers@postgresql.org; Mon, 17 Jul 2017 21:35:06 +0000 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dXDfS-00021N-VZ for pgsql-hackers@postgresql.org; Mon, 17 Jul 2017 21:35:05 +0000 Received: by mail-qt0-x243.google.com with SMTP id l55so301366qtl.3 for ; Mon, 17 Jul 2017 14:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mDkz9ImsKPAyjwnYEWi1ZkNV0rISGoPpCoikgma+hAA=; b=C8Nrxav+d+DK+z3tEiMb5QcUf1RZVnepy6OfICaIN6jYbTDFdAUIULsETd1xSHduAC c3wD4M1IjjY3NSCVbaJSuLhxuLZ6aM+xQ0pRdxX4UQigU1Sy4DaiDQRRmomTy2Yofd/w StljMaiQPhE5u8ilKeduD9mGrCedLkT3cxeohlz981gE3BhUvZmAY+uYVlilPdmcBst7 QV2csSlJjRjSPZgN1QwFAAHUgAsRM/33+SQRMLxX+iItlAnmWZBAvIdHu02ZBQ4yke4X R0Q60Z55rskl3s7pGbyz077WM6UkoPepXajKoOieuZ2GDCFL+YMRP04TRbzdg9gauUng okEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mDkz9ImsKPAyjwnYEWi1ZkNV0rISGoPpCoikgma+hAA=; b=ZNpW9FAiWSN5sZdMBwl17N1bFXxNS2ul9vDaG5m5RmoBKkrHKz/wRl5Ljp9JlkYTz1 n2nEEKPl1N3Vi3x/8XxtuQJDTDzVPnmQzVtPMjdjNfe3HOUGUU4gn6PXK/up0Sh8xAQC HEBW+4+sjknyps0Z+qbLlHOApY9rVxQCNyyf4W8MJxF3vlG6yEmLHj6USvvF70AciAwR nLpbOfcgWrFyOjQeCgbKQrrIkdRxvUBqYIAoS0JeUEl9B2Dytx7v//HB7NJLQpST3AqJ 5FmzLd7Nh9CxZomywZI0Jg6v7zVXKh2sRvaszU9Hd2Kpdmbdk6Wmx4T02WyJZQFUxV2J siHw== X-Gm-Message-State: AIVw110aBJhC3fd+8/OaSBjU5sUhSgWzl0GoQoed3GEKGa1eoZCx0PDZ brniylr1UmSuN/rYoAg= X-Received: by 10.200.62.145 with SMTP id y17mr18712710qtf.142.1500327301266; Mon, 17 Jul 2017 14:35:01 -0700 (PDT) Received: from [192.168.2.121] ([172.92.221.196]) by smtp.gmail.com with ESMTPSA id a1sm233812qkg.54.2017.07.17.14.35.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 14:35:00 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Something for the TODO list: deprecating abstime and friends From: Mark Dilger In-Reply-To: <12814.1500326041@sss.pgh.pa.us> Date: Mon, 17 Jul 2017 14:34:58 -0700 Cc: pgsql-hackers@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <30691.1500156034@sss.pgh.pa.us> <3D60B97C-5E80-4343-9CCF-390CD23B0E23@gmail.com> <3CD79F5D-DB73-4F2A-B698-44FF1930CB97@gmail.com> <12814.1500326041@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3124) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org > On Jul 17, 2017, at 2:14 PM, Tom Lane wrote: >=20 > Mark Dilger writes: >>> On Jul 17, 2017, at 12:54 PM, Mark Dilger wro= te: >> On Jul 15, 2017, at 3:00 PM, Tom Lane wrote: >>>> The types abstime, reltime, and tinterval need to go away, or be >>>> reimplemented, sometime well before 2038 when they will overflow. >=20 >>> These types provide a 4-byte datatype for storing real-world second >>> precision timestamps, as occur in many log files. Forcing people to >>> switch to timestamp or timestamptz will incur a 4 byte per row >>> penalty. In my own builds, I have changed the epoch on these so >>> they won't wrap until sometime after 2100 C.E. I see little point in >>> switching to an 8-byte millisecond precision datatype when a perfectly >>> good 4-byte second precision datatype already serves the purpose. >=20 > Well, if you or somebody is willing to do the legwork, I'd be on board > with a plan that says that every 68 years we redefine the origin of > abstime. I imagine it could be done so that currently-stored abstime > values retain their present meaning as long as they're not too old. > For example the initial change would toss abstimes before 1970 overboard, > repurposing that range of values as being 2038-2106, but values between > 1970 and 2038 still mean the same as they do today. If anybody still > cares in circa 2085, we toss 1970-2038 overboard and move the origin > again, lather rinse repeat. >=20 > But we're already past the point where it would be time to make the > first such switch, if we're gonna do it. So I'd like to see somebody > step up to the plate sooner not later. Assuming other members of the community would not object to such a plan, I'd be willing to step up to that plate. I'll wait a respectable t= ime, maybe until tomorrow, to allow others to speak up. > I'd be inclined to toss reltime and tinterval overboard in any case. Yeah, I don't use those either, preferring to cast abstime to timestamp (or timestamptz) prior to doing any math on them. >=20 >> Oh, and if you could be so kind, please remove them in a commit that >> does nothing else. It's much easier to skip the commit that way. >=20 > We doubtless would do that, but you're fooling yourself if you imagine > that you can maintain such a fork for long while still tracking the > community version otherwise. Once those hand-assigned OIDs are free > they'll soon be absorbed by future feature patches, and then you'll > have enormous merge problems. Oh, not so much. Knowing that they were going to be deprecated, I already moved the Oids for these to something higher than 10000. In my own builds, the Oid generator does not assign Oids lower than 65536, which leaves room for me to assign in the 10000-65535 range without merge headaches. It would, however, be simpler if the types did not go away, as that would cause minor merge headaches elsewhere, such as in the regression tests. mark --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers