From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Björn Lundin <b.f.lundin@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@postgresql.org
Subject: Re: Order by and timestamp SOLVED
Date: Tue, 17 Mar 2020 08:50:25 -0700
Message-ID: <1ce5aa7c-3019-6211-294c-def8e03c0d2d@aklaver.com> (raw)
In-Reply-To: <5E2FF59B-3E85-42C8-9C83-FED22A337695@gmail.com>
References: <63004F55-4CA3-40F8-A898-E7A646B0EBD3@gmail.com>
<c171c26b-fd5e-b4bf-ec86-97b6f8dbcbe0@aklaver.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>
<B8742026-DBCA-475E-9036-65C61DA2639B@gmail.com>
<5e1a2f75-2d9c-889b-7504-63edb615caf6@aklaver.com>
<33EA1F8F-5B37-41DD-B045-88FC8D207AC6@gmail.com>
<1776fcbe-d55a-2059-7abf-0a615896a871@aklaver.com>
<5E2FF59B-3E85-42C8-9C83-FED22A337695@gmail.com>
On 3/17/20 12:28 AM, Björn Lundin wrote:
>
>
>
>>> So insert is
>>> bnl@ibm2:~/db$ psql
>>> Tidtagning är på.
>>> AUTOCOMMIT off
>>> psql (9.6.15, server 9.4.15)
>>> Skriv "help" för hjälp.
>>
>> Except you are using psql 9.6.15 against a 9.4.15 server.
>>
>> What happens if you use psql(9.4.15) to do sort query against 9.4.15
>> server?
>
> So this is more than strange
>
> bnl@ibm2:~$ /usr/lib/postgresql/9.4/bin/psql
> Timing is on.
> AUTOCOMMIT off
> psql (9.4.15)
> Type "help" for help.
>
>
> This. works. I did not realize I ran different client/server versions.
> 9.6 must have come with a Debian upgrade where I did not migrate the
> database to 9.6,
> but got the psql 9.6 as default (/sr/bin/psql)
>
>
> However AFTER I checked the bad sorting - sep/oct 2016 and early apr 2017
> With psql 9.4 I connected with psql 9.6 again.
> And now the sorting error is gone her too!
>
> I cannot reproduce it anymore
>
> So I learned this - always use same version of client and server
I made the suggestion to try the same psql version as the server because
I had run out of ideas. It is usually not an issue to mix and match
psql/server versions. In fact the Debian/Ubuntu packaging will by
default use the latest psql to connect to all versions installed as it
is backwards compatible. I have also gone the other way older psql/newer
server, you just lose any added features from the newer psql.
I am still not sure that this can be marked solved. I am trying to
figure out how running a different version of psql once can affect
another version of psql. That would seem to imply psql changed something
on the server and AFAIK sorting/ordering is done by the server not the
client.
>
> Many thanks to Adrian and Tom
>
>
> --
> Björn Lundin
> b.f.lundin@gmail.com <mailto:b.f.lundin@gmail.com>
>
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, b.f.lundin@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Order by and timestamp SOLVED
In-Reply-To: <1ce5aa7c-3019-6211-294c-def8e03c0d2d@aklaver.com>
References: <63004F55-4CA3-40F8-A898-E7A646B0EBD3@gmail.com> <c171c26b-fd5e-b4bf-ec86-97b6f8dbcbe0@aklaver.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> <B8742026-DBCA-475E-9036-65C61DA2639B@gmail.com> <5e1a2f75-2d9c-889b-7504-63edb615caf6@aklaver.com> <33EA1F8F-5B37-41DD-B045-88FC8D207AC6@gmail.com> <1776fcbe-d55a-2059-7abf-0a615896a871@aklaver.com> <5E2FF59B-3E85-42C8-9C83-FED22A337695@gmail.com> <1ce5aa7c-3019-6211-294c-def8e03c0d2d@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox