pgsql: Avoid memory leakage when a series of subtransactions invoke

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Avoid memory leakage when a series of subtransactions invoke
Дата
Msg-id 20070701174550.122139FB488@postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Avoid memory leakage when a series of subtransactions invoke AFTER triggers
that are fired at end-of-statement (as is the normal case for foreign keys,
for example).  In this situation the per-subxact deferred trigger context
is always empty when subtransaction exit is reached; so we could free it,
but were not doing so, leading to an intratransaction leak of 8K or more
per subtransaction.  Per off-list example from Viatcheslav Kalinin
subsequent to bug #3418 (his original bug report omitted a foreign key
constraint needed to cause this leak).

Back-patch to 8.2; prior versions were not using per-subxact contexts
for deferred triggers, so did not have this leak.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/commands:
        trigger.c (r1.210.2.1 -> r1.210.2.2)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c.diff?r1=1.210.2.1&r2=1.210.2.2)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Avoid memory leakage when a series of subtransactions invoke
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Treat the autovac launcher more like a regular backend, in that