Re: PostgreSQL 10: Segmentation fault when using GROUPING SETS with all unsortable columns

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Huong Dangminh <huo-dangminh(at)ys(dot)jp(dot)nec(dot)com>
Cc: "pgsql-hackers\(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Hiroshi Yanagisawa <hir-yanagisawa(at)ut(dot)jp(dot)nec(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: PostgreSQL 10: Segmentation fault when using GROUPING SETS with all unsortable columns
Date: 2018-03-20 10:02:27
Message-ID: 87vadrf4o4.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Andrew" == Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:

Huong> Not yet fully understand the related commit, but I think it is
Huong> fine to put ERRCODE_FEATURE_NOT_SUPPORTED error from
Huong> preprocess_grouping_sets when all columns in GROUPING SETS are
Huong> unsortable. Is that right?

Andrew> No, that's definitely wrong. The intent is to be able to
Andrew> generate a hashed path in this case, it's just the logic that
Andrew> tries to prefer sorting to hashing when the input arrives
Andrew> already sorted is doing the wrong thing for unsortable data.

Attached is what I think is the correct fix, which I'll commit shortly.

--
Andrew (irc:RhodiumToad)

Attachment Content-Type Size
gsfix.patch text/x-patch 3.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleksandr Shulgin 2018-03-20 10:09:49 Re: [HACKERS] [PATCH] Generic type subscripting
Previous Message Magnus Hagander 2018-03-20 09:46:29 Re: Online enabling of checksums