pgsql: Fix possible crash with GENERATED ALWAYS columns

Поиск
Список
Период
Сортировка
От David Rowley
Тема pgsql: Fix possible crash with GENERATED ALWAYS columns
Дата
Msg-id E1jPcxR-0004Am-21@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix possible crash with GENERATED ALWAYS columns

In some corner cases, this could also lead to corrupted values being
included in the tuple.

Users who are concerned that they are affected by this should first
upgrade and then perform a base backup of their database and restore onto
an off-line server. They should then query each table with generated
columns to ensure there are no rows where the generated expression does
not match a newly calculated version of the GENERATED ALWAYS expression.
If no crashes occur and no rows are returned then you're not affected.

Fixes bug #16369.

Reported-by: Cameron Ezell
Discussion: https://postgr.es/m/16369-5845a6f1bef59884@postgresql.org
Backpatch-through: 12 (where GENERATED ALWAYS columns were added.)

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a375f11c44cf245363f356508f7d5126bdaa18ae

Modified Files
--------------
src/backend/executor/nodeModifyTable.c  |  7 +++++++
src/test/regress/expected/generated.out | 12 ++++++++++++
src/test/regress/sql/generated.sql      |  7 +++++++
3 files changed, 26 insertions(+)


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

Предыдущее
От: David Rowley
Дата:
Сообщение: pgsql: Fix possible crash with GENERATED ALWAYS columns
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pgsql: Only provide openssl_tls_init_hook if building withopenssl