Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpjFi-0000uE-R0 for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Sep 2017 22:56:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dpjFi-0002Zx-77 for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Sep 2017 22:56:58 +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 1dpjEB-0008Kv-6b for pgsql-hackers@postgresql.org; Wed, 06 Sep 2017 22:55:23 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dpjE7-0004jX-Cu for pgsql-hackers@postgresql.org; Wed, 06 Sep 2017 22:55:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v86Mt8b5003193; Wed, 6 Sep 2017 18:55:08 -0400 From: Tom Lane To: Omar Kilani cc: Andres Freund , "Joshua D. Drake" , Jim Nasby , Petr Jelinek , Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Replication vs. float timestamps is a disaster In-reply-to: References: <1691.1487519369@sss.pgh.pa.us> <20170220070311.gscn7ppqbwlgdpjq@alap3.anarazel.de> <3bd3c551-8b23-45c8-27a2-97b5a922b130@2ndquadrant.com> <20170220110456.2jupmfhxlizykmmc@alap3.anarazel.de> <20170222075345.mbzrmdaetdqfgitk@alap3.anarazel.de> <21041.1487771008@sss.pgh.pa.us> <20170222135634.gnlqu6by2xbpvwii@alap3.anarazel.de> <21225.1487803552@sss.pgh.pa.us> <8f819ff5-0162-f382-72d1-da565ceb4125@commandprompt.com> <20170228011332.afd5x35pftvwkxbd@alap3.anarazel.de> Comments: In-reply-to Omar Kilani message dated "Wed, 06 Sep 2017 15:33:56 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3191.1504738508.1@sss.pgh.pa.us> Date: Wed, 06 Sep 2017 18:55:08 -0400 Message-ID: <3192.1504738508@sss.pgh.pa.us> 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 Omar Kilani writes: > Is there anything people using float datetimes can do that isn't a > pg_dumpall | pg_restore to do a less painful update? Um, not really. You may be stuck on 9.6 until you can spare the effort to convert. The physical representations of timestamps are totally different in the two cases. > I did attempt a pg_dumpall | pg_restore at one point but for whatever > reason we had data in tables that integer datetimes fails on (I forget > the exact crash, but the datetime values were either too small or too > large to fit into the integer datetimes field -- I can retry this if > it would be helpful). I'm pretty sure the minimum values are the same in both cases, to wit Julian day zero. As for the max, according to the old code comments * The upper limit for dates is 5874897-12-31, which is a bit less than what * the Julian-date code can allow. We use that same limit for timestamps when * using floating-point timestamps ... For integer timestamps, the upper * limit is 294276-12-31. I would hope that any timestamps you've got beyond 294276AD are erroneous data that you need to clean up anyway. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers