Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jDxdQ-00084D-RZ for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2020 21:50:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDxdO-0000oM-Mo for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2020 21:50:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDxdO-0000oE-5E for pgsql-general@lists.postgresql.org; Mon, 16 Mar 2020 21:50:54 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jDxdH-0004L3-GS for pgsql-general@postgresql.org; Mon, 16 Mar 2020 21:50:53 +0000 Received: by mail-lj1-x242.google.com with SMTP id g12so20498898ljj.3 for ; Mon, 16 Mar 2020 14:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=WS3sh76lFO+ASHZAzAR2a49SlLqcxH+esxT9y6+vhD4=; b=iYHd1c3Ph2K/GwmAO/qdu0ftXs+zgMIGURsdn3nM17bmyRazbOUPrctEMQp48o1Y8b Gj8ssAE7ku5L2d00//eFIY4VqSVKCvTSXv6KodFyfd6nyDpY2Bgd8Q4FJLbEyGO/JhP1 LWYmDveJaioPQIwXi2APEc1Z12FKp3HT8S9UqiXJFNN3uWJhV2Af2MzNeO8ogu+zMDnc r5qbPx7/gXQof0N4fSiuSL0+r88Vn3C80zg04gGhuS7byqwdTfUlwbCmQDqJRFwvg3wo Cygh0G1M+jNpb3yw8884Q+9bBip8vO+iZfhCTchuPHY+Z9Z91OnawT+1G9OE437uHDjW TKBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=WS3sh76lFO+ASHZAzAR2a49SlLqcxH+esxT9y6+vhD4=; b=cKzr39FtGy81gVeDWbeliJ/lbfR642CFeWn8helIFbZxgsIEJEu81fZPqvn1NAUROX tURziSgzyNVGEZ/+bnjC2dEKUvIrvSwNlBa5pTZhzQayzySWqr+aGqa7ar869wKp9V2z GLH9X4VC+CdQkLL0Koo2dKEexMyqIlxNO69zqfNw5Ewi/07xGoD53iYI+pRnzgrzN1Bz vISd/GHhAg2OVtb8nNReyB4CS35v/6rVyWnMtTFyXfEgOQ1C+QmNsJVpYkAg1EX2Z+nV KlTV2S42JE2Q5PFHYcH0u0daNidcpLePeYGzApzCJU6NXwhiErnlBjaln77DmEXQ5FJP +p4g== X-Gm-Message-State: ANhLgQ0mEufYdaAr/FOgCG1//41B+hMv2t4U9nhCLztAravyXreMi86H y4u7LCIr423OACGVaT0OXacKvDQwQ4t3rA== X-Google-Smtp-Source: ADFU+vsooRrJzRbRwiwn/M6jOYlK31hIP8WQTt9rqf31iKadu2XoAmLcsQjHJRvOvCcX8sBZqdVSOQ== X-Received: by 2002:a2e:9415:: with SMTP id i21mr742183ljh.227.1584395445861; Mon, 16 Mar 2020 14:50:45 -0700 (PDT) Received: from imac.lan (81-227-64-79-no276.tbcn.telia.com. [81.227.64.79]) by smtp.gmail.com with ESMTPSA id z9sm839427lfa.16.2020.03.16.14.50.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Mar 2020 14:50:45 -0700 (PDT) From: =?utf-8?Q?Bj=C3=B6rn_Lundin?= Message-Id: <33EA1F8F-5B37-41DD-B045-88FC8D207AC6@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_7DBD2843-9A76-4AF9-8361-D00876D8EDEE" Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Order by and timestamp Date: Mon, 16 Mar 2020 22:50:44 +0100 In-Reply-To: <5e1a2f75-2d9c-889b-7504-63edb615caf6@aklaver.com> Cc: Tom Lane , pgsql-general@postgresql.org To: Adrian Klaver References: <63004F55-4CA3-40F8-A898-E7A646B0EBD3@gmail.com> <24142.1584319263@sss.pgh.pa.us> <7D74B8B5-DFBD-4B5B-85C6-A516343E49C1@gmail.com> <346C3B58-D29E-4CC2-8200-691ECA91F494@gmail.com> <10f84f23-6011-28ab-79a1-a1c259424d2e@aklaver.com> <72890A04-294E-4753-8839-69F0BAD9AA17@gmail.com> <9004c731-b2eb-faaa-6dc9-6ebd231c5879@aklaver.com> <5e1a2f75-2d9c-889b-7504-63edb615caf6@aklaver.com> X-Mailer: Apple Mail (2.3445.9.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_7DBD2843-9A76-4AF9-8361-D00876D8EDEE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > 16 mars 2020 kl. 20:26 skrev Adrian Klaver = : >=20 > Per Tom's comment, what are the encodings? Just sent reply to his mail with the encodings > Also I would point out that the problem occurs on the machine you are = dumping/restoring backwards 9.6 --> 9.4. Not sure if that is relevant or = not, but worth looking at. >=20 > How is the dump/restore done(plain text, custom format, etc) and what = are the command strings? I pasted 2 days at pastebin (with date marking added) https://pastebin.com/4E24JLEF > Also what versions of pg_dump/pg_restore are you using on the dump and = restore sides for the various Postgres versions? Hmm, now that is tricky, The prod has - as I briefly mentioned - been on the AWS So I used its pg_dump. But I don=E2=80=99t recall version In my notes I can see that we started with an ubuntu 12.04 image But - I always use the pg_dump that belongs to the source database And psql that belongs to the target database So insert is=20 bnl@ibm2:~/db$ psql Tidtagning =C3=A4r p=C3=A5. AUTOCOMMIT off psql (9.6.15, server 9.4.15) Skriv "help" f=C3=B6r hj=C3=A4lp. While pg_dump may have varied through the years The dump at pastebin gave me no clue of version that created it Lately (the lsat 2 years or so) it has ben the pg_dump on the pi bnl@pibetbot:~ $ pg_dump --version pg_dump (PostgreSQL) 9.6.10 But not for that data sep/oct 2016 > Yes really, otherwise you would not be seeing a difference. Sorry, pet = peeve of mine, when people say these two things are not doing the same = thing but then say they are the same thing. >=20 >> I mean, the pg_dump does copy-commands. >=20 > It also does a certain amount of setup at the beginning of the file. I stand corrected -- Bj=C3=B6rn Lundin b.f.lundin@gmail.com --Apple-Mail=_7DBD2843-9A76-4AF9-8361-D00876D8EDEE Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

16 mars 2020 kl. 20:26 skrev Adrian Klaver <adrian.klaver@aklaver.com>:

Per Tom's comment, what are the encodings?
Just sent reply to his mail = with the encodings



Also I would point out that the problem occurs on the machine = you are dumping/restoring backwards 9.6 --> 9.4. Not sure if that is = relevant or not, but worth looking at.

How = is the dump/restore done(plain text, custom format, etc) and what are = the command strings?

I pasted 2 days at pastebin

(with date marking added)



Also what versions of pg_dump/pg_restore are you using on = the dump and restore sides for the various Postgres versions?

Hmm, = now that is tricky,
The prod has - as I briefly mentioned - = been on the AWS
So I used its pg_dump. But I don=E2=80=99t = recall version
In my notes I can see that we started with an = ubuntu 12.04 image

But - I always = use the pg_dump that belongs to the source database
And psql = that belongs to the target database
So insert = is 
bnl@ibm2:~/db$ psql
Tidtagning =C3=A4r p=C3=A5.
AUTOCOMMIT off
psql = (9.6.15, server 9.4.15)
Skriv = "help" f=C3=B6r hj=C3=A4lp.

While pg_dump = may have varied through the years
The dump at pastebin gave me = no clue of version that created it

Lately (the lsat 2 years or so) it has ben the = pg_dump on the pi
bnl@pibetbot:~ = $ pg_dump --version
pg_dump = (PostgreSQL) 9.6.10

But not = for that data sep/oct 2016


Yes really, otherwise you = would not be seeing a difference. Sorry, pet peeve of mine, when people = say these two things are not doing the same thing but then say they are = the same thing.

I mean, the pg_dump does copy-commands.

It also does a certain amount of = setup at the beginning of the file.

I stand = corrected

--
Bj=C3=B6rn Lundin




= --Apple-Mail=_7DBD2843-9A76-4AF9-8361-D00876D8EDEE--