pgsql: Fix test_decoding's handling of nonexistant columns in old tuple

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Fix test_decoding's handling of nonexistant columns in old tuple
Дата
Msg-id E1Z8toy-0006U2-JK@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix test_decoding's handling of nonexistant columns in old tuple versions.

test_decoding used fastgetattr() to extract column values. That's wrong
when decoding updates and deletes if a table's replica identity is set
to FULL and new columns have been added since the old version of the
tuple was created. Due to the lack of a crosscheck with the datum's
natts values an invalid value will be output, leading to errors or
worse.

Bug: #13470
Reported-By: Krzysztof Kotlarski
Discussion: 20150626100333.3874.90852@wrigleys.postgresql.org

Backpatch to 9.4, where the feature, including the bug, was added.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ed6c8d73619a69c8751c8662242fdce22d31bc42

Modified Files
--------------
contrib/test_decoding/expected/ddl.out |   14 ++++++++++++--
contrib/test_decoding/sql/ddl.sql      |    4 ++++
contrib/test_decoding/test_decoding.c  |    2 +-
3 files changed, 17 insertions(+), 3 deletions(-)


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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: pgsql: Add opaque declaration of HTAB to tqual.h.
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix test_decoding's handling of nonexistant columns in old tuple