Proposal: HOT Update Runtime Check Clarification - Mailing list pgsql-docs

From Yahya Yusuf
Subject Proposal: HOT Update Runtime Check Clarification
Date
Msg-id CABdOcVX=pXqTNNRxNVFv4O=JrSN9VPUwhx+gK5hhwkbgqS_dnw@mail.gmail.com
Whole thread
List 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 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.", 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

pgsql-docs by date:

Previous
From: Hoda Salim
Date:
Subject: [PATCH] docs: document N'...' national character string literal syntax
Next
From: Erik Wienhold
Date:
Subject: Re: [PATCH] docs: document N'...' national character string literal syntax