Re: Wrong results with grouping sets

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Richard Guo <guofenglinux(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Wrong results with grouping sets
Date: 2024-07-19 19:22:57
Message-ID: 74388.1721416977@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Jul 4, 2024 at 5:52 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
>> As-is they can't be backpatched, unless I am missing something? Afaict they
>> introduce rather thorough ABI breaks? And API breaks, actually?

> Aside from that, this looks quite invasive for back-patching, and the
> number of bug reports so far suggest that we should be worried about
> more breakage appearing later.

Yeah, 0 chance of back-patching this. If we had more confidence in it
maybe we could see our way to putting it in v17, but I fear that would
be tempting the software gods. It needs to get through a full beta
test cycle.

> However, that leaves us in a situation where we have no back-patchable
> fix for a bug which causes queries to return the wrong answer, which
> is not a great situation.

It's not; but this has been wrong since grouping sets were put in,
yet the number of field reports so far can probably still be counted
without running out of fingers. I'm content if we can fix it going
forward, and would not expend a lot of effort on a probably-futile
search for a fix that doesn't involve a query data structure change.

(I'm aware that I ought to review this patch, and will try to make
time for that before the end of the CF.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-07-19 19:24:39 Re: allow changing autovacuum_max_workers without restarting
Previous Message Alena Rybakina 2024-07-19 19:19:55 Re: Evaluate arguments of correlated SubPlans in the referencing ExprState