pgsql: Fix nasty bug in nodeIndexscan.c's detection of duplicate tuples

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Fix nasty bug in nodeIndexscan.c's detection of duplicate tuples
Дата
Msg-id 20060519163050.AFE389FA3B3@postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Fix nasty bug in nodeIndexscan.c's detection of duplicate tuples during
a multiple (OR'ed) indexscan.  It was checking for duplicate
tuple->t_data->t_ctid, when what it should be checking is tuple->t_self.
The trouble situation occurs when a live tuple has t_ctid not pointing to
itself, which can happen if an attempted UPDATE was rolled back.  After a
VACUUM, an unrelated tuple could be installed where the failed update tuple
was, leading to one live tuple's t_ctid pointing to an unrelated tuple.
If one of these tuples is fetched by an earlier OR'ed indexscan and the other
by a later indexscan, nodeIndexscan.c would incorrectly ignore the second
tuple.  The bug exists in all 7.4.* and 8.0.* versions, but not in earlier
or later branches because this code was only used in those releases.  Per
trouble report from Rafael Martinez Guerrero.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/executor:
        nodeIndexscan.c (r1.99 -> r1.99.4.1)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/nodeIndexscan.c.diff?r1=1.99&r2=1.99.4.1)

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

Предыдущее
От: teodor@postgresql.org (Teodor Sigaev)
Дата:
Сообщение: pgsql: Simplify gistSplit() and some refactoring related code.
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix nasty bug in nodeIndexscan.c's detection of duplicate tuples