Re: [PATCH] ANALYZE: hash-accelerate MCV tracking for equality-only types

From: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
To: Chengpeng Yan <chengpeng_yan(at)outlook(dot)com>
Cc: Tatsuya Kawata <kawatatatsuya0913(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, John Naylor <johncnaylorls(at)gmail(dot)com>
Subject: Re: [PATCH] ANALYZE: hash-accelerate MCV tracking for equality-only types
Date: 2026-05-03 14:16:24
Message-ID: d6124b11-cd3c-44d8-858c-c1c9e2d9a616@tantorlabs.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/14/26 04:34, Chengpeng Yan wrote:

> I split v5 accordingly. The first patch changes the singleton handling
> from shifting to a cursor-based eviction scheme, and the second patch
> adds the hash lookup.
I reviewed v5 of the patches. Instead of going through each issue one by
one, I made a pass to clean up and clarify the code and summarize the
main changes belows:

- Fixed a few typos in comments and added comments in places where the
logic was not immediately clear;

- Rewrote the bubble-up loop using `for` loop, which I find more
readable. Also removed some confusing uses of the `j` variable that mase
the flow harder to follow;

- Simplified parts of the code to improve overall readability.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/

Attachment Content-Type Size
v6-0002-ANALYZE-hash-accelerate-MCV-tracking-for-equality.patch text/x-patch 8.7 KB
v6-0001-ANALYZE-use-cursor-eviction-for-distinct-value-tr.patch text/x-patch 5.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2026-05-03 14:41:27 Re: Make printtup a bit faster
Previous Message Smolkin Grigory 2026-05-03 14:04:09 Streaming replication and WAL archive interactions