Remove useless memory context switch in ExecHashTableCreate()

From: cca5507 <cca5507(at)qq(dot)com>
To: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Remove useless memory context switch in ExecHashTableCreate()
Date: 2026-12-03 09:50:01
Message-ID: tencent_80216C2D7D4A8E8C011EEEC1A51D4CA85906@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

After adf97c1562, the "MemoryContextSwitchTo(hashtable->hashCxt)" in ExecHashTableCreate()
is useless, so attach a patch to remove it. While at it, rename "oldctx" to "oldcxt" to keep consistent
and fix a stale comment.

Now PrepareTempTablespaces() will not be called within hashCxt, but I think it's ok.

--
Regards,
ChangAo Chen

Attachment Content-Type Size
v1-0001-Remove-useless-memory-context-switch-in-ExecHashT.patch application/octet-stream 2.4 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2026-12-03 09:53:20 Re: Streamed transactions lose replication origin when first change is not a row change
Previous Message Hayato Kuroda (Fujitsu) 2026-12-03 09:48:46 RE: Show the conflict log table in \dRs+ output