Re: pgsql: Use malloc() in GetLockConflicts() when called InHotStandby to

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Use malloc() in GetLockConflicts() when called InHotStandby to
Дата
Msg-id 15185.1264693407@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Use malloc() in GetLockConflicts() when called InHotStandby to  (sriggs@postgresql.org (Simon Riggs))
Ответы Re: pgsql: Use malloc() in GetLockConflicts() when called InHotStandby to  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-committers
sriggs@postgresql.org (Simon Riggs) writes:
> Log Message:
> -----------
> Use malloc() in GetLockConflicts() when called InHotStandby to avoid repeated
> palloc calls. Current code assumed this was already true, so this is a bug fix.

It seems pretty ugly to allocate the same pointer sometimes with malloc
and sometimes with palloc.  How about palloc'ing it in TopMemoryContext
when you want it to be persistent?

            regards, tom lane

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

Предыдущее
От: mha@postgresql.org (Magnus Hagander)
Дата:
Сообщение: pgsql: Add functions to reset the statistics counter for a single
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: pgsql: Use malloc() in GetLockConflicts() when called InHotStandby to