[PATCH v2] Fix hash join costing when the inner side is provably unique

From: He Kuang <hekuang(dot)git(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: [PATCH v2] Fix hash join costing when the inner side is provably unique
Date: 2026-11-17 14:09:40
Message-ID: CAC5HyrzNpuEG45SMbKh4X498ROedfLboJibqEDwu0dZWweObSQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Attached is v2.

Changes since v1:
- Rebased onto master 11591f273e6a (2026-11-17).
- Update contrib/pg_plan_advice/expected/gather.out: the corrected
costing changes the plan recorded there from a parallel hash join to
a merge join. make check and check-world pass with the update.

The costing logic itself is unchanged.

Regards,
He Kuang

Attachment Content-Type Size
fix-hash-join-costing-inner-unique-v2.patch text/plain 13.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jakub Wartak 2026-11-17 14:24:46 Re: libpq: SCRAM client proofs serialize across threads on OpenSSL 3 (re-init of the HMAC per PBKDF2 iteration)
Previous Message Sami Imseih 2026-11-17 14:08:37 Re: pgstat: Flush some statistics within running transactions, take 2