pgsql: Fix potential use-after-free for BEFORE UPDATE row triggers onn

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Fix potential use-after-free for BEFORE UPDATE row triggers onn
Дата
Msg-id E1hHIGL-0008Fl-87@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix potential use-after-free for BEFORE UPDATE row triggers on non-core AMs.

When such a trigger returns the old row version, it naturally get
stored in the slot for the trigger result. When a table AMs doesn't
store HeapTuples internally, ExecBRUpdateTriggers() frees the old row
version passed to triggers - but before this fix it might still be
referenced by the slot holding the new tuple.

Noticed when running the out-of-core zheap AM against the in-core
version of tableam.

Author: Andres Freund

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/75e03eabeaac8fd229b14f74de55d0e1470903c4

Modified Files
--------------
src/backend/commands/trigger.c | 9 +++++++++
1 file changed, 9 insertions(+)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Fix plan created for inherited UPDATE/DELETE with all tables exc
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Remove dependency to pageinspect in recovery tests