pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <a.lepikhov@postgrespro.ru>
To: Alexander Korotkov <aekorotkov@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Alexander Korotkov <akorotkov@postgresql.org>
Cc: PostgreSQL Bug List <pgsql-bugs@lists.postgresql.org>
Cc: Richard Guo <guofenglinux@gmail.com>
Subject: Re: v17 Possible Union All Bug
Date: Thu, 8 Feb 2024 12:52:17 +0700
Message-ID: <7e8c5fc5-efcd-4e6e-b1f7-84446568d6f9@postgrespro.ru> (raw)
In-Reply-To: <CAPpHfds3HKGo88b3f7Lz9yAKd29_N76cGDneVOgHDWgUCjXK4A@mail.gmail.com>
References: <CAKFQuwY3Ek=cLThgd8FdaSc5JRDVt0FaV00gMcWra+TAR4gGUw@mail.gmail.com>
	<CAKFQuwZKMbccEbjfLmpaBmD+heXRa-Cmf+XOKRe=mOxc9HYpqQ@mail.gmail.com>
	<CAApHDvoJ21egQX=Mf015PBVY_9AoPhrdw-3Xpxr+Re_UjvnFTQ@mail.gmail.com>
	<CAApHDvqGS=y2EgzLLJLBqPu0Cms9kecVs7H3ZG2pz9ofL9r3zg@mail.gmail.com>
	<CAKFQuwaahSXUgT1Vpzm_L8YY3g=j8Hc0u0UTeXkNHHyff77Bcw@mail.gmail.com>
	<CAKFQuwbp8cFu_w88cD8M9s6YppnBL1KkJOC9ht8E7MLscUTqvQ@mail.gmail.com>
	<CAPpHfds_6Bk2H2FE_AxPTQ7A4cTWXCFVyXaX2TA4t5BUb-q46A@mail.gmail.com>
	<41499cc3-31a1-4c9e-85d6-45e6d901ea6a@postgrespro.ru>
	<c566aa61-b381-4420-ade9-24d0a01b71be@postgrespro.ru>
	<a9440b72-91c3-4041-89ec-531de5c2a5bc@postgrespro.ru>
	<e225591f-50bf-4b35-8b87-8107477804d2@postgrespro.ru>
	<CAPpHfds3HKGo88b3f7Lz9yAKd29_N76cGDneVOgHDWgUCjXK4A@mail.gmail.com>

On 7/2/2024 16:28, Alexander Korotkov wrote:
> On Sun, Feb 4, 2024 at 6:57 AM Andrei Lepikhov
> <a.lepikhov@postgrespro.ru> wrote:
>> The simple fix is in the attachment. But I'm not sure we should fix
>> GROUP-BY optimization instead of the more general issue.
>> The source of the problem is root->group_pathkeys, which contains
>> grouping pathkeys and aggregate pathkeys. For now, their 'sortref'
>> values could intersect, and we can differ which one references the query
>> target list and which one the target list of the aggregate.
>> So, I would like to get advice here: should we make a quick fix here, or
>> is such a mess in the sortref values not a mess and designed for some
>> purposes?
> 
> Thank you, Andrei.  I think we should apply this fix for now, while
> better refactoring could be done in future.  I've revised your fix
> with more comments and a commit message.  I'm going to push it if
> there are no objections.
I looked into the patch and found only one typo, 'pahtkeys'.

-- 
regards,
Andrei Lepikhov
Postgres Professional






view thread (13+ messages)

Message-ID: <7e8c5fc5-efcd-4e6e-b1f7-84446568d6f9@postgrespro.ru>
Permalink:  ../7e8c5fc5-efcd-4e6e-b1f7-84446568d6f9@postgrespro.ru/
Also on:    postgresql.org/message-id/7e8c5fc5-efcd-4e6e-b1f7-84446568d6f9@postgrespro.ru

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: a.lepikhov@postgrespro.ru, aekorotkov@gmail.com, david.g.johnston@gmail.com, tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, akorotkov@postgresql.org, pgsql-bugs@lists.postgresql.org, guofenglinux@gmail.com
  Subject: Re: v17 Possible Union All Bug
  In-Reply-To: <7e8c5fc5-efcd-4e6e-b1f7-84446568d6f9@postgrespro.ru>

* 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