Re: Question: test "aggregates" failed in 32-bit machine

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Question: test "aggregates" failed in 32-bit machine
Date: 2022-10-01 22:57:22
Message-ID: 1027340.1664665042@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jonathan S. Katz" <jkatz(at)postgresql(dot)org> writes:
> On 10/1/22 3:13 PM, Tom Lane wrote:
>> I'm still of the opinion that we need to revert this code for now.

> [RMT hat, but speaking just for me] reading through Tom's analysis, this
> seems to be the safest path forward. I have a few questions to better
> understand:

> 1. How invasive would the revert be?

I've just finished constructing a draft full-reversion patch. I'm not
confident in this yet; in particular, teasing it apart from 1349d2790
("Improve performance of ORDER BY / DISTINCT aggregates") was fairly
messy. I need to look through the regression test changes and make
sure that none are surprising. But this is approximately the right
scope if we rip it out entirely.

I plan to have a look tomorrow at the idea of reverting only the cost_sort
changes, and rewriting get_cheapest_group_keys_order() to just sort the
keys by decreasing numgroups estimates as I suggested upthread. That
might be substantially less messy, because of fewer interactions with
1349d2790.

> 2. Are the other user-visible items that would be impacted?

See above. (But note that 1349d2790 is HEAD-only, not in v15.)

> 3. Is there an option of disabling the feature by default viable?

Not one that usefully addresses my concerns. The patch did add an
enable_group_by_reordering GUC which we could change to default-off,
but it does nothing about the cost_sort behavioral changes. I would
be a little inclined to rip out that GUC in either case, because
I doubt that we need it with the more restricted change.

regards, tom lane

Attachment Content-Type Size
draft-db0d67db2-revert.patch text/x-diff 98.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-10-01 22:58:27 Re: longfin and tamandua aren't too happy but I'm not sure why
Previous Message Andres Freund 2022-10-01 22:15:14 Re: longfin and tamandua aren't too happy but I'm not sure why