pgsql: Remove an "optimization" I installed in 2001, to make repalloc()

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: Remove an "optimization" I installed in 2001, to make repalloc()
Дата
Msg-id 20070812203914.1628A754258@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Remove an "optimization" I installed in 2001, to make repalloc() attempt to
enlarge the memory chunk in-place when it was feasible to do so.  This turns
out to not work well at all for scenarios involving repeated cycles of
palloc/repalloc/pfree: the eventually freed chunks go into the wrong freelist
for the next initial palloc request, and so we consume memory indefinitely.
While that could be defended against, the number of cases where the
optimization can still be applied drops significantly, and adjusting the
initial sizes of StringInfo buffers makes it drop to almost nothing.
Seems better to just remove the extra complexity.
Per recent discussion and testing.

Modified Files:
--------------
    pgsql/src/backend/utils/mmgr:
        aset.c (r1.73 -> r1.74)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/aset.c?r1=1.73&r2=1.74)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Increase the initial size of StringInfo buffers to 1024 bytes
Следующее
От: mkz@pgfoundry.org (User Mkz)
Дата:
Сообщение: pgbouncer - pgbouncer: list.h: remove max_count as it was unused,