Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzMt8-00056s-DI for pgsql-general@arkaria.postgresql.org; Mon, 10 Sep 2018 14:10:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzMt6-0006Xp-GZ for pgsql-general@arkaria.postgresql.org; Mon, 10 Sep 2018 14:10:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzMt4-0006Xi-CX for pgsql-general@lists.postgresql.org; Mon, 10 Sep 2018 14:10:00 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzMt0-0006cV-53 for pgsql-general@lists.postgresql.org; Mon, 10 Sep 2018 14:09:57 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E4FE221E79; Mon, 10 Sep 2018 10:09:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 10 Sep 2018 10:09:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=B0wni+S41QRo3fgFhx4Pp7/rs4wFP CDoVLaEzvcvG/Y=; b=FZTMqfy2zoLws3W1Pp5zS7CxPqK8mY+CDPVRZXgcQH+vA AmFPvR/sGM9cfIA2e2mnfvbuVp3EUAlYYDaDtr8ML3Vg58MWL2XOIUNpkdlKdIiR IDwOj7WhIrm2tPGuJEAaaEb+PE4t9f031q3G0cI9YRxKycOu8xf/OT2RLusH3D9/ 0rzqh1HEg8GXmIkjfYFhQZTKs45GzXqbb9tkwQEaNEHEpU+H83snPtDQ18tqCSvx ADWofdDhGQn6AVDH90HIptcs89TIR5x757AFX1LC8VlLHHv3psHONhslohcH06FI TQpolV+64EWG3id7Cw1tY3Mm/K+t/qwX4HWFGoVxw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=B0wni+ S41QRo3fgFhx4Pp7/rs4wFPCDoVLaEzvcvG/Y=; b=Rl6sByqFBVZU6H+EBujnYf cC2+4EKc3qUOWdOOomTQqzFV0G0FTB18AD0j9tvtLw6ghpBcW8ES75HoXxWOxbWj Xw02J7fmHNuSW5mnZA7Zu/IfztJqv834lopCvPsSn0SDLxKo73n3/d0XTPypAwiM /1BjWoaDrGv9rDQvMrc7GxcYE2V1fzapz+/PqEjgHpo8Gq931VdUGlynlMX8vuKY MtLCYOSQUX3O4Gal88p7faUjI7vyK4EI2cWxGs2UN1fvV6hSPv2tjs/oLg6+F4oW o/yjCYTNMAlMGuUxws1/CjiWXiGBZbpKtGSnUbcF9zCrzFZ00kZBx/Jq8AUse8dw == X-ME-Proxy: X-ME-Sender: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 10D5EE4682; Mon, 10 Sep 2018 10:09:51 -0400 (EDT) Subject: Re: PG8.3->10 migration data differences To: Csaba Ragasits , pgsql-general@lists.postgresql.org References: <20180910100040.wzglexkarz57w3ts@hjp.at> From: Adrian Klaver Message-ID: <023170c2-8466-2666-cd1e-679f10b3de57@aklaver.com> Date: Mon, 10 Sep 2018 07:09:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/10/18 6:43 AM, Csaba Ragasits wrote: > I think I found the solution. > > When I set this parameter on the pg10 client connection, the pg10 REAL > value format same as the pg83 value: In your previous post you mentioned both 9.3 and 8.3. Is 8.3 the actual version you are migrating from? > > SET extra_float_digits = 0; > > Interesting, because the default value is 0 in the postgresql.conf: > #extra_float_digits = 0                 # min -15, max 3 > > Do you have any ideas how can I format the miliseconds too? Assuming you are moving from 8.3 what does: pg_controldata -D /your_83/data_dir show for Date/time type storage: ? vs pg_controldata -D /your_10/data_dir > > Thx, > Csaba > > 2018-09-10 12:00 GMT+02:00 Peter J. Holzer >: > > On 2018-09-10 11:57:42 +0300, Achilleas Mantzios wrote: > > On 10/09/2018 11:22, Csaba Ragasits wrote: > >     Hello, > > > >     We would like to migrate our old databases to new postgres server, > >     with the simple backup-restore process. The process run fine > >     without errors but when we're  checking the source and the > >     migrated datas as field level, we found the following differences: > [...] > > > >     Field type: REAL > >     pg93: 2.2 > >     pg10: 2.20000005 > > > > > > Those have to do with rounding. Precision for real is 6 decimal > > digits. Your difference is on the 8-th digit. > > Nitpick: Precision is 24 binary digits which is *about* 6 decimal > digits. The number which is actually stored (on both pg93 and pg10) is > actually 2.2000000476837158203125 (1.00011001100110011001101 * 2^1 in > binary). Apparently Pg9.3 rounds this to "2.2" on output while Pg10 > prints the more precise (but still not exact) "2.20000005". > > (I would argue that the Pg9.3 output is better, since it represents the > same value in fewer digits, but always printing the minimum number of > digits necessary is surprisingly difficult.) > >         hp > > -- >    _  | Peter J. Holzer    | we build much bigger, better disasters now > |_|_) |                    | because we have much more sophisticated > | |   | hjp@hjp.at          | management tools. > __/   | http://www.hjp.at/ | -- Ross Anderson > > -- Adrian Klaver adrian.klaver@aklaver.com