Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cflfp-0002d9-0D for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Feb 2017 10:58:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cflfo-0007zE-JV for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Feb 2017 10:58:28 +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 1cflfd-0007pr-Pm for pgsql-hackers@postgresql.org; Mon, 20 Feb 2017 10:58:17 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cflfb-00085m-GJ for pgsql-hackers@postgresql.org; Mon, 20 Feb 2017 10:58:17 +0000 Received: by mail-wm0-x231.google.com with SMTP id r141so49369866wmg.1 for ; Mon, 20 Feb 2017 02:58:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=b2gosSsCFWsy3ttKdf5qH4VyBi6unPDjjm+ITbW2v0A=; b=vxDSkx1Zn1RWK7G0CBOArduf/PxPBrigDshXKexr3vXXZQjSzaDHwm9GTVWplfCrRA tkjkIuSz1SfM+6NlVkYuePiD1H+nUbBW+5/X7I1K6b2I+fCldDGAzc148c7zmPa+eoF5 49pGBo7I17udhQCWdYEBbz9clmCgDfGyXPUaOgzovCiOhZC46meAq4p03wjHSCqz02iT UZvwQ+nB3SUNdvq2zGnmalFTRwltnmteKzC4CFFm1lnovnauzUztjJDrvRWBo1uaT0i9 LL5d5RC7zhuQ1HDi/j7Na82XZCxvTwWYBdJ7DjqNiEgHT0bdiXeTDfw2oz5cem8CCHXb pVkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=b2gosSsCFWsy3ttKdf5qH4VyBi6unPDjjm+ITbW2v0A=; b=ZGm5SHXXoKOCfPe7YPdgPHKbey06hgvv5o6VVpeXfXLDGjG9ALPhn4Q6Yswcz75Gkv RVJTdeB3vkU9N7qfeut2Ah/NPzgPOdqM1A9feVB1xj+QRcRlk8KGONCybRIODIpbNjg4 rnQUM4Z4g/x7Jid6Uya4WzRQL5K0FB4zKwAMAGcQVlDuRFHYQv5lCjK1DlL7zDMGTSZ9 OHXXxraCQgOgZGcD97rehFQ3bCiEiMoE0NXN0PGbZcshXlljUsImHi0y2bIv7EaWR02E LDZQ6JzZJfPTuCI/Hu4UGXrVuCn0qqzJFWKwRCpvIk+an97EyziUOMugvK1J0styTGB0 Xwzg== X-Gm-Message-State: AMke39l7FmXmBfv2BXkFethoyaT3b9+TSlnf4UaaSgmo3+zcVsaY3k1Tz8w1S9sHppIwmhgDFk4TemqjzCUsMvb/ltGFoX/zJYgRjVatmYGcAjWYiYUuU7thvRUDXFUtSU0ZW3y2/WEnlmihOnxRd4pSCXreKvCJbIF1Hfln1ERYHgarT6rjyV3wO/oP97HarNQ7VlHPCQVn X-Received: by 10.28.54.195 with SMTP id y64mr17001451wmh.10.1487588294513; Mon, 20 Feb 2017 02:58:14 -0800 (PST) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id o2sm12914735wmb.28.2017.02.20.02.58.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Feb 2017 02:58:13 -0800 (PST) Subject: Re: Replication vs. float timestamps is a disaster To: Andres Freund , Tom Lane References: <26788.1487455319@sss.pgh.pa.us> <1691.1487519369@sss.pgh.pa.us> <20170220070311.gscn7ppqbwlgdpjq@alap3.anarazel.de> Cc: Robert Haas , "pgsql-hackers@postgresql.org" From: Petr Jelinek Message-ID: <3bd3c551-8b23-45c8-27a2-97b5a922b130@2ndquadrant.com> Date: Mon, 20 Feb 2017 11:58:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170220070311.gscn7ppqbwlgdpjq@alap3.anarazel.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 20/02/17 08:03, Andres Freund wrote: > On 2017-02-19 10:49:29 -0500, Tom Lane wrote: >> Robert Haas writes: >>> On Sun, Feb 19, 2017 at 3:31 AM, Tom Lane wrote: >>>> Thoughts? Should we double down on trying to make this work according >>>> to the "all integer timestamps" protocol specs, or cut our losses and >>>> change the specs? >> >>> I vote for doubling down. It's bad enough that we have so many >>> internal details that depend on this setting; letting that cascade >>> into the wire protocol seems like it's just letting the chaos spread >>> farther and wider. >> >> How do you figure that it's not embedded in the wire protocol already? >> Not only the replicated data for a timestamp column, but also the >> client-visible binary I/O format, depend on this. I think having some >> parts of the protocol use a different timestamp format than other parts >> is simply weird, and as this exercise has shown, it's bug-prone as all >> get out. > > I don't think it's that closely tied together atm. Things like > pg_basebackup, pg_receivexlog etc should work, without having to match > timestamp storage. Logical replication, unless your output plugin dumps > data in binary / "raw" output, also works just fine across the timestamp > divide. > > It doesn't sound that hard to add a SystemToIntTimestamp() function, > given it only needs to do something if float timestamps are enabled? > It's definitely not hard, we already have IntegerTimestampToTimestampTz() which does the opposite conversion anyway. That being said, I did wonder myself if we should just deprecate float timestamps as well. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers