pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: David Raymond <David.Raymond@tomtom.com>
Cc: pgsql-bugs\@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16031: Group by returns duplicate groups
Date: Tue, 01 Oct 2019 20:26:56 +0100
Message-ID: <87h84sl1b5.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <VI1PR07MB6029FB0F82E62287C300563C879D0@VI1PR07MB6029.eurprd07.prod.outlook.com>
References: <16031-4ef55395a5fbb687@postgresql.org>
	<18850.1569867434@sss.pgh.pa.us>
	<VI1PR07MB602902D7CE166594FC1EF5AE87820@VI1PR07MB6029.eurprd07.prod.outlook.com>
	<VI1PR07MB6029CF9430ECED44CB457E3B87820@VI1PR07MB6029.eurprd07.prod.outlook.com>
	<871rvxm4je.fsf@news-spur.riddles.org.uk>
	<VI1PR07MB6029A84A61C5A88328B50AC3879D0@VI1PR07MB6029.eurprd07.prod.outlook.com>
	<87sgoclcux.fsf@news-spur.riddles.org.uk>
	<VI1PR07MB6029E7C9B73250E386088047879D0@VI1PR07MB6029.eurprd07.prod.outlook.com>
	<VI1PR07MB6029FB0F82E62287C300563C879D0@VI1PR07MB6029.eurprd07.prod.outlook.com>

>>>>> "David" == David Raymond <David.Raymond@tomtom.com> writes:

 David> I checked for other places where there was weirdness going on
 David> and there are more.

You could try something like,

select name, lname
  from (select name, lag(name) over (order by name) as lname
          from big_table) s
 where name < lname;

That should show all cases where the sort order was inconsistent with
the < operator (which obviously should never happen).

However, there's not much more I can do to help with this, since I don't
use Windows myself and have no useful access to any Windows system. You
might try and cut down the data to the smallest set that shows
inconsistencies using the above; particularly relevant is whether the
problem only shows up for external merge sorts or whether it happens for
in-memory sorts too.

-- 
Andrew (irc:RhodiumToad)





view thread (19+ messages)  latest in thread

Message-ID: <87h84sl1b5.fsf@news-spur.riddles.org.uk>
Permalink:  ../87h84sl1b5.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87h84sl1b5.fsf@news-spur.riddles.org.uk

 · 

reply

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-bugs@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, David.Raymond@tomtom.com
  Subject: Re: BUG #16031: Group by returns duplicate groups
  In-Reply-To: <87h84sl1b5.fsf@news-spur.riddles.org.uk>
  References: <16031-4ef55395a5fbb687@postgresql.org> <18850.1569867434@sss.pgh.pa.us> <VI1PR07MB602902D7CE166594FC1EF5AE87820@VI1PR07MB6029.eurprd07.prod.outlook.com> <VI1PR07MB6029CF9430ECED44CB457E3B87820@VI1PR07MB6029.eurprd07.prod.outlook.com> <871rvxm4je.fsf@news-spur.riddles.org.uk> <VI1PR07MB6029A84A61C5A88328B50AC3879D0@VI1PR07MB6029.eurprd07.prod.outlook.com> <87sgoclcux.fsf@news-spur.riddles.org.uk> <VI1PR07MB6029E7C9B73250E386088047879D0@VI1PR07MB6029.eurprd07.prod.outlook.com> <VI1PR07MB6029FB0F82E62287C300563C879D0@VI1PR07MB6029.eurprd07.prod.outlook.com> <87h84sl1b5.fsf@news-spur.riddles.org.uk>

* 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