Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Bykov Ivan <i(dot)bykov(at)modernsys(dot)ru>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Sami Imseih <samimseih(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET
Date: 2025-03-25 22:56:50
Message-ID: CAApHDvqJVDqQCZMKECHtV_SD5+_9M-UJ9HxR=NGcHytpbcZ1ww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 26 Mar 2025 at 01:11, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> I'm happy to proceed with the v7 version. I'm also happy to credit you
> as the primary author of it, given that you came up with the v2b
> patch. It might be best to extract the performance stuff that's in v7
> and apply that separately from the bug fix. If you're still interested
> and have time in the next 7 hours to do it, would you be able to split
> the v7 as described, making v8-0001 as the bug fix and v8-0002 as the
> performance stuff? If so, could you also add the total_jumble_len to
> v8-0001 like Michael's last patch had, but adjust so it's only
> maintained for Assert builds. Michael is quite keen on having more
> assurance that custom jumble functions don't decide to forego any
> jumbling.
>
> If you don't have time, I'll do it in my morning (UTC+13).

Here is the v8 version with the bug fix and performance stuff
separated out. I also added the Assert code to ensure we always add
something to the jumble buffer when jumbling a node.

I didn't include the regression tests I saw in the v2b patch [1]. I
felt these were just marking the fact that there used to be a bug
here.

David

[1] https://postgr.es/m/5ac172e0b77a4baba50671cd1a15285f%40localhost.localdomain

Attachment Content-Type Size
v8-0001-Fix-query-jumbling-to-account-for-NULL-nodes.patch application/octet-stream 5.2 KB
v8-0002-Optimize-Query-jumble.patch application/octet-stream 6.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-03-25 23:01:37 Re: Cannot find a working 64-bit integer type on Illumos
Previous Message Noah Misch 2025-03-25 22:44:40 Re: AIO v2.5