Proposal: HOT Update Runtime Check Clarification

From: Yahya Yusuf <webyahyaver(at)gmail(dot)com>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Proposal: HOT Update Runtime Check Clarification
Date: 2026-02-02 17:06:18
Message-ID: CABdOcVX=pXqTNNRxNVFv4O=JrSN9VPUwhx+gK5hhwkbgqS_dnw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hey team,
I was going through the docs trying to understand the requirements of a
Heap-Only Tuple update for a situation I faced where an update query was
marking all columns as modified and thus was causing write
amplification.The official docs led me to believe that because a new tuple
was being created from this update, HOT update would never occur, but
checking the source code, I came across this passage from the README.HOT
<https://github.com/postgres/postgres/blob/a9afa021e95f2b0ffaaf26f3a27e685f634f4ac9/src/backend/access/heap/README.HOT#L141>
which
details that there is runtime comparison logic "The requirement for doing a
HOT update is that none of the indexed columns are changed. This is checked
at execution time by comparing the binary representation of the old and new
values."

The official docs contain the first half: "The update does not modify any
columns referenced by the table's indexes, not including summarizing
indexes. The only summarizing index method in the core PostgreSQL
distribution is BRIN <https://www.postgresql.org/docs/current/brin.html>.",
I suggest continuing it with "At runtime, a binary comparison checks old
and new values to determine if a change has occurred in the indexed values"
as well.

I have attached a patch containing the suggested change.

Thanks!

Attachment Content-Type Size
hot-update-runtime-check-documentation.patch text/x-patch 1023 bytes

Browse pgsql-docs by date

  From Date Subject
Next Message Erik Wienhold 2026-02-02 17:09:18 Re: [PATCH] docs: document N'...' national character string literal syntax
Previous Message Hoda Salim 2026-02-02 15:05:03 [PATCH] docs: document N'...' national character string literal syntax