Обсуждение: pgsql: Revise large-object access routines to avoid running with

Поиск
Список
Период
Сортировка

pgsql: Revise large-object access routines to avoid running with

От
tgl@postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Revise large-object access routines to avoid running with CurrentMemoryContext
set to the large object context ("fscxt"), as this is inevitably a source of
transaction-duration memory leaks.  Not sure why we'd not noticed it before;
maybe people weren't touching a whole lot of LOs in the same transaction
before the 8.1 pg_dump changes.  Per report from Wayne Conrad.

Backpatched as far as 8.1, but the problem doubtless goes all the way back.
I'm disinclined to spend the time to try to verify that the older branches
would still work if patched, seeing that this code was significantly modified
for 8.0 and again for 8.1, and that we don't have any trouble reports before
8.1.  (Maybe the leaks were smaller before?)

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/libpq:
        be-fsstubs.c (r1.79.2.1 -> r1.79.2.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/be-fsstubs.c.diff?r1=1.79.2.1&r2=1.79.2.2)
    pgsql/src/backend/storage/large_object:
        inv_api.c (r1.113 -> r1.113.2.1)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/large_object/inv_api.c.diff?r1=1.113&r2=1.113.2.1)
    pgsql/src/include/storage:
        large_object.h (r1.32 -> r1.32.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/large_object.h.diff?r1=1.32&r2=1.32.2.1)