From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix misuse of table_index_fetch_tuple_check(). |
Date: | 2020-06-25 17:56:13 |
Message-ID: | E1joW6f-0007eK-UN@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix misuse of table_index_fetch_tuple_check().
Commit 0d861bbb, which added deduplication to nbtree, had
_bt_check_unique() pass a TID to table_index_fetch_tuple_check() that
isn't safe to mutate. table_index_fetch_tuple_check()'s tid argument is
modified when the TID in question is not the latest visible tuple in a
hot chain, though this wasn't documented.
To fix, go back to using a local copy of the TID in _bt_check_unique(),
and update comments above table_index_fetch_tuple_check().
Backpatch: 13-, where B-Tree deduplication was introduced.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/10f1ab2cb8bea3c6741a78f6dc19a5c91c0a34e1
Modified Files
--------------
src/backend/access/nbtree/nbtinsert.c | 3 ++-
src/backend/access/table/tableam.c | 4 ++++
src/include/access/tableam.h | 4 +++-
3 files changed, 9 insertions(+), 2 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2020-06-25 22:23:01 | pgsql: docs: clarify that CREATE DATABASE does not copy db permissions |
Previous Message | Tom Lane | 2020-06-25 17:28:44 | pgsql: Doc: correct nitpicky mistakes in array_position/array_positions |