pgsql: Fix misuse of table_index_fetch_tuple_check().

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема pgsql: Fix misuse of table_index_fetch_tuple_check().
Дата
Msg-id E1joW6f-0007eL-Um@gemulon.postgresql.org
обсуждение исходный текст
Список 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
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8c2010f12344ed8834c6f63406a78e5843ebec69

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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: correct nitpicky mistakes in array_position/array_positions
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: docs: clarify that CREATE DATABASE does not copy db permissions