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 1jDtzA-0007Og-GQ for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2020 17:57:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDtz9-0004lT-69 for pgsql-general@arkaria.postgresql.org; Mon, 16 Mar 2020 17:57:07 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDtz7-0004lE-9k for pgsql-general@lists.postgresql.org; Mon, 16 Mar 2020 17:57:06 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jDtyy-0005fX-Sm for pgsql-general@postgresql.org; Mon, 16 Mar 2020 17:57:04 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 237165C03D3; Mon, 16 Mar 2020 13:56:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 16 Mar 2020 13:56:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=5 lLeLNQ/LTcBCC+iNBVpAaXTotQE1hzXhwty+5ZRbhk=; b=rGYD1ROSVUNZ2U12b n995ueDv/NpcHXiApL40QlTWxQ8vmYYKGHAh0IgvM7kpVLYUBJF0zzULzey+R0oL sW+aDIWr3SRDhSOJmp/Jm0d0c7D5/UL0q5dCBW33DkuEdMsxyQBCibqOmnpBeBWN Ds4JCQbVxdfACaj5F4chceCNcbwSbK2tnqKVp8SWzooVSd+iBd/V8jXd+H/BQUAv So7piv8V1PhycpRvrHn4oKiSoXM66LZ5A3qjGYZRPFANG9dalRlIs61TclE1AGD+ ejp8As/VPThn+cnF7iKkawoJD0B77S85kjsR/OxzBHEYh+WxjE2S507DqOpLWuzm gunYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=5lLeLNQ/LTcBCC+iNBVpAaXTotQE1hzXhwty+5ZRb hk=; b=Xi4qhWaEBZBiBhSx6HoZX4CgDJdDWa8daiVAXmTEk1Vwm0XG9OXWRfAaq n8iLqoM6nJyNUppuY1NmNDi15shiK2BJ3+3aCHZQ9lhnx53rrXRkD3tHCT2i/kRp DsIkLP5v3xloBbv9BYmF/YtEfxs9U32kYuvrXHnGk3GJmsSYnuy88HEwiHNP7kX9 GSmzMn6wLg+2DnEYaRIPrCXg2fZ18wbOm5jywY5XPL18LugG7bww0LnKxen0AG2c TkLB9OfKYW7gJNaR3eaNrhQRanPweX1v8eXUabvZOrleQbugY2U8Aogz5mmd8yOD pmx8Gue4nCf+s7wJfZbnbOZJtjXcA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudeffedguddtiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecukfhppeejuddrvdduvddruddvledrudelfeenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkh hlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id 1249D328005E; Mon, 16 Mar 2020 13:56:52 -0400 (EDT) Subject: Re: Order by and timestamp To: =?UTF-8?Q?Bj=c3=b6rn_Lundin?= Cc: Tom Lane , pgsql-general@postgresql.org 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> From: Adrian Klaver Message-ID: <9004c731-b2eb-faaa-6dc9-6ebd231c5879@aklaver.com> Date: Mon, 16 Mar 2020 10:56:52 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <72890A04-294E-4753-8839-69F0BAD9AA17@gmail.com> 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 3/16/20 9:15 AM, Björn Lundin wrote: > > >> 16 mars 2020 kl. 16:46 skrev Adrian Klaver > >: >> >> On 3/16/20 3:03 AM, Björn Lundin wrote: >>>>> Yeah, it's hard to think of any explanation other than "the query >>>>> used a >>>>> corrupt index on startts to produce the ordering".  But your \d doesn't >>>>> show any index on startts.  So maybe there's more than one amarkets >>>>> table? >>> I realize that I have (basically) the same dataset on another machine. >> >> Which brings me back to your first post where you had: >> >> Timing is on. >> AUTOCOMMIT off >> psql (9.6.10) >> Type "help" for help. >> >> Then you said the database was: >> >>                                     version >> ------------------------------------------------------------------------------------------------ >> PostgreSQL 9.4.15 on x86_64-unknown-linux-gnu, compiled by gcc (Debian >> 4.9.2-10) 4.9.2, 64-bit >> (1 rad) >> >> Which seemed to be confirmed by: >> >> bnl@ibm2:~$ psql >> Tidtagning är på. >> AUTOCOMMIT off >> psql (9.6.15, server 9.4.15) >> Skriv "help" för hjälp. >> >> >> That leaves me wondering how you got to the output in the first post? > > Ooh - terrible sorry. > The output from first post describing the database schema > Was actually from my production machine - a raspberry pi. > The pi hold a db on an usb-disk, which is pg_dump()ed every night and > imported to ibm2 history db (the bad one) > > The schema is identical to the one with trouble - which is a history > database > Intended for testing To be clear the RPI version of the database sorts correctly? > > I did not realize that would matter when posting - did the post away > from home, Yes, it would be have been nice to know at the outset there where multiple instances involved. > I can reach the prod machine but not the history machine (ibm2) from > outside. > So - from the pi - first post > -- Adrian Klaver adrian.klaver@aklaver.com