{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf", "published": "2026-10-21T05:00:39Z", "publisher": "PostgresAI", "article": {"title": "Postgres Performance Boost: HOT Updates and Fill Factor | Crunchy Data Blog", "url": "https://www.crunchydata.com/blog/postgres-performance-boost-hot-updates-and-fill-factor", "date_published": "2024-03-13T00:00:00Z", "author": "Elizabeth Christensen, co-authored with Stephen Frost", "publisher": "Crunchy Data"}, "grade": "A", "axes": [{"axis": "Factual", "summary": "A \u00b7 0 wrong of 15 checked \u00b7 1 caveat"}, {"axis": "Applicable", "summary": "A \u00b7 0 wrong of 5 checked \u00b7 0 caveats"}, {"axis": "Consistent", "summary": "A \u00b7 0 wrong of 15 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "A \u00b7 0 wrong of 5 checked \u00b7 0 caveats"}, {"axis": "Safe", "summary": "A \u00b7 0 wrong of 9 checked \u00b7 0 caveats"}], "findings": [{"anchor": "F1", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F1", "claim": "\u2026Postgres will skip the update to the index IF you aren\u2019t updating the index key\u2026", "explanation": "The article\u2019s summary broadly restricts changes to indexed data, but \u201cindex key\u201d is too narrow. REL_16_2 src/backend/utils/cache/relcache.c:5315-5318 includes non-key columns among HOT dependencies. Expression inputs and partial-index predicates also count. Check these dependencies before lowering fillfactor to improve HOT eligibility.", "verdict": "Mostly accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/src/backend/utils/cache/relcache.c#L5315-L5318", "label": "REL_16_2 \u00b7 src/backend/utils/cache/relcache.c:5315-5318"}, {"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/src/backend/utils/cache/relcache.c#L5347-L5351", "label": "REL_16_2 \u00b7 src/backend/utils/cache/relcache.c:5347-5351"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/utils/cache/relcache.c#L5451-L5454", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/utils/cache/relcache.c:5451-5454"}]}, {"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F2", "claim": "Postgres also adds a HOT chain link from the old row to the new row\u2026", "title": "HOT links row versions on one heap page", "explanation": "HOT stores the successor on the same heap page. The old tuple's t_ctid links to that successor. src/backend/access/heap/README.HOT:62-63 describes this link. Index dependencies must also permit HOT.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/src/backend/access/heap/README.HOT#L62-L63", "label": "REL_16_2 \u00b7 src/backend/access/heap/README.HOT:62-63"}, {"url": "https://github.com/postgres/postgres/blob/c372fbbd8e911f2412b80a8c39d7079366565d67/src/backend/access/heap/heapam.c#L3685-L3711", "label": "REL_16_0 \u00b7 src/backend/access/heap/heapam.c:3685-3711"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/access/heap/heapam.c#L4080-L4099", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/access/heap/heapam.c:4080-4099"}]}, {"anchor": "F3", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F3", "claim": "This allows columns indexed with BRIN to be updated and still have HOT updates occur.", "title": "PostgreSQL 16 permits HOT changes to BRIN-indexed columns", "explanation": "PostgreSQL 16 permits HOT when only BRIN-indexed columns change and the successor fits the same page. src/backend/access/heap/heapam.c:3691-3710 implements that distinction. BRIN summarizes block ranges. PostgreSQL can still update the BRIN summary.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/src/backend/access/heap/README.HOT#L41-L46", "label": "REL_16_2 \u00b7 src/backend/access/heap/README.HOT:41-46"}, {"url": "https://github.com/postgres/postgres/blob/c372fbbd8e911f2412b80a8c39d7079366565d67/src/backend/access/heap/heapam.c#L3685-L3711", "label": "REL_16_0 \u00b7 src/backend/access/heap/heapam.c:3685-3711"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/access/heap/heapam.c#L4080-L4099", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/access/heap/heapam.c:4080-4099"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F4", "claim": "Postgres uses a default fill factor of 100 for tables.", "title": "The table fillfactor default is 100", "explanation": "The table default is fillfactor=100. Accepted settings range from 10 to 100. doc/src/sgml/ref/create_table.sgml:1447-1455 documents the range and reserved update space. PostgreSQL 19 retains these settings.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ref/create_table.sgml#L1447-L1458", "label": "REL_16_2 \u00b7 doc/src/sgml/ref/create_table.sgml:1447-1458"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/doc/src/sgml/ref/create_table.sgml#L1614-L1625", "label": "REL_19_STABLE@48b43081e5 \u00b7 doc/src/sgml/ref/create_table.sgml:1614-1625"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F5", "claim": "By lowering the fill factor, you increase the chances\u2026", "title": "Lower fillfactor reserves space that can enable HOT", "explanation": "Lower fillfactor reserves insertion-time space for updates. src/backend/access/heap/hio.c:539-554 includes that reserve when selecting insertion pages. More free space improves same-page update chances. Lower occupancy can also increase the number of pages a scan reads.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ref/create_table.sgml#L1447-L1458", "label": "REL_16_2 \u00b7 doc/src/sgml/ref/create_table.sgml:1447-1458"}, {"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/storage.sgml#L1135-L1137", "label": "REL_16_2 \u00b7 doc/src/sgml/storage.sgml:1135-1137"}, {"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/src/backend/access/heap/hio.c#L539-L554", "label": "REL_16_2 \u00b7 src/backend/access/heap/hio.c:539-554"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/doc/src/sgml/ref/create_table.sgml#L1614-L1625", "label": "REL_19_STABLE@48b43081e5 \u00b7 doc/src/sgml/ref/create_table.sgml:1614-1625"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/doc/src/sgml/ref/create_table.sgml#L1614-L1620", "label": "REL_19_STABLE@48b43081e5 \u00b7 doc/src/sgml/ref/create_table.sgml:1614-1620"}]}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F6", "claim": "\u2026n_tup_hot_upd AS hot_updates\u2026", "title": "The statistics query selects the HOT-update counter", "explanation": "pg_stat_user_tables exposes n_tup_hot_upd and n_tup_upd. The latter includes HOT updates. src/backend/catalog/system_views.sql:664-667 defines these counters. The query's ORDER BY hot_updates DESC correctly sorts by its output alias.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/src/backend/catalog/system_views.sql#L664-L667", "label": "REL_16_2 \u00b7 src/backend/catalog/system_views.sql:664-667"}, {"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/monitoring.sgml#L4852-L4953", "label": "REL_16_2 \u00b7 doc/src/sgml/monitoring.sgml:4852-4953"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/catalog/system_views.sql#L729-L732", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/catalog/system_views.sql:729-732"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F7", "claim": "\u2026ALTER TABLE my_table SET (FILLFACTOR = 80);\u2026", "title": "ALTER TABLE changes the fillfactor setting", "explanation": "ALTER TABLE changes fillfactor to 80. It does not immediately redistribute existing rows. doc/src/sgml/ref/alter_table.sgml:779-787 documents this distinction. Existing packed pages can require a table rewrite before they have the requested free-space distribution.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ref/alter_table.sgml#L779-L787", "label": "REL_16_2 \u00b7 doc/src/sgml/ref/alter_table.sgml:779-787"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/doc/src/sgml/ref/alter_table.sgml#L869-L878", "label": "REL_19_STABLE@48b43081e5 \u00b7 doc/src/sgml/ref/alter_table.sgml:869-878"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F8", "claim": "\u2026Prior to Postgres 16, any index on an updated column would block updates from being HOT.", "title": "BRIN compatibility with HOT starts in PostgreSQL 16", "explanation": "PostgreSQL 16.0 release notes explicitly allow HOT updates when only BRIN-indexed columns change. PostgreSQL 15 requires unchanged indexed values. The pinned PostgreSQL 19 source retains the summarizing-index exception.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/c372fbbd8e911f2412b80a8c39d7079366565d67/doc/src/sgml/release-16.sgml#L587-L588", "label": "REL_16_0 \u00b7 doc/src/sgml/release-16.sgml:587-588"}, {"url": "https://github.com/postgres/postgres/blob/2a7ce2e2ce474504a707ec03e128fde66cfb8b48/src/backend/access/heap/README.HOT#L34-L36", "label": "REL_15_0 \u00b7 src/backend/access/heap/README.HOT:34-36"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/access/heap/README.HOT#L41-L42", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/access/heap/README.HOT:41-42"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F9", "claim": "\u2026the old row data since it may still be in use by other processes\u2026", "title": "HOT preserves row versions that concurrent transactions can still see", "explanation": "README.HOT:82\u201383 permits reclaiming the old tuple after no transaction can see it. HOT does not discard a version that an active snapshot still needs.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/access/heap/README.HOT#L82-L83", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/access/heap/README.HOT:82-83"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F10", "claim": "\u2026changing the value very much as that could reduce the effectiveness of the BRIN\u2026", "title": "Updates that disrupt physical correlation can weaken BRIN filtering", "explanation": "brin.sgml:16\u201318 describes BRIN\u2019s intended correlation between column values and physical location. Updates that disrupt this correlation can reduce filtering effectiveness.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/doc/src/sgml/brin.sgml#L16-L18", "label": "REL_19_STABLE@48b43081e5 \u00b7 doc/src/sgml/brin.sgml:16-18"}]}, {"anchor": "F11", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F11", "claim": "\u2026how often updates are being performed on a table and how many of them are HOT updates\u2026", "explanation": "monitoring.sgml:4322\u20134327 defines n_tup_hot_upd as the HOT-updated row count. The HOT documentation identifies pg_stat_all_tables as the view for monitoring HOT and non-HOT updates.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/monitoring.sgml#L4852-L4953", "label": "REL_16_2 \u00b7 doc/src/sgml/monitoring.sgml:4852-4953"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/doc/src/sgml/monitoring.sgml#L4322-L4327", "label": "REL_19_STABLE@48b43081e5 \u00b7 doc/src/sgml/monitoring.sgml:4322-4327"}, {"url": "https://www.postgresql.org/docs/current/storage-hot.html", "label": "https://www.postgresql.org/docs/current/storage-hot.html"}]}, {"anchor": "F12", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F12", "claim": "\u2026HOT updates reduce the amount of disk I/O\u2026", "title": "HOT avoids redundant index entries and their maintenance", "explanation": "README.HOT:48\u201350 documents smaller indexes and faster searches from avoiding duplicate index entries. Avoiding those insertions also removes their processing and I/O work. Application savings depend on the workload.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/access/heap/README.HOT#L48-L50", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/access/heap/README.HOT:48-50"}]}, {"anchor": "F13", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F13", "claim": "\u2026they reduce IOPs, WAL\u2026", "title": "HOT can reduce WAL volume", "explanation": "heapam.c:9063\u20139065 documents WAL savings from logging changed portions of same-page tuple versions. HOT also avoids redundant index entries. These mechanisms support the article\u2019s general WAL claim.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/access/heap/README.HOT#L48-L50", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/access/heap/README.HOT:48-50"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/access/heap/heapam.c#L9063-L9065", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/access/heap/heapam.c:9063-9065"}]}, {"anchor": "F14", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F14", "claim": "\u2026it leaves 30% of the page empty to accommodate future updates to existing rows\u2026", "explanation": "A 70% table fill factor targets 30% free page space (derived: 100% - 70%). src/include/utils/rel.h:392 computes the same complement.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ref/create_table.sgml#L1447-L1458", "label": "REL_16_2 \u00b7 doc/src/sgml/ref/create_table.sgml:1447-1458"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/include/utils/rel.h#L392-L392", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/include/utils/rel.h:392-392"}]}, {"anchor": "F15", "url": "https://pgtrue.postgres.ai/shared/brief/7d12a85c-8537-48f4-b25c-14684a519eaf#F15", "claim": "The value ranges from 10 to 100\u2026", "explanation": "Table fill factor accepts 10% through 100%. src/include/utils/rel.h:361 defines the minimum. src/backend/access/common/reloptions.c:197 registers the maximum. The default is 100%.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/b78fa8547d02fc72ace679fb4d5289dccdbfc781/doc/src/sgml/ref/create_table.sgml#L1447-L1458", "label": "REL_16_2 \u00b7 doc/src/sgml/ref/create_table.sgml:1447-1458"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/include/utils/rel.h#L361-L362", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/include/utils/rel.h:361-362"}, {"url": "https://github.com/postgres/postgres/blob/48b43081e550f9e4b04e1184ed6d3fed4f850691/src/backend/access/common/reloptions.c#L197-L197", "label": "REL_19_STABLE@48b43081e5 \u00b7 src/backend/access/common/reloptions.c:197-197"}]}]}