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

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: pgsql: Use malloc() in GetLockConflicts() when called InHotStandby to
Дата
Msg-id 1264693567.24669.10769.camel@ebony
обсуждение исходный текст
Ответ на Re: pgsql: Use malloc() in GetLockConflicts() when called InHotStandby to  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Thu, 2010-01-28 at 10:43 -0500, Tom Lane wrote:
> 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?

Yes, that sounds more graceful. Will do.

--
 Simon Riggs           www.2ndQuadrant.com


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Use malloc() in GetLockConflicts() when called InHotStandby to
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Define INADDR_NONE on Solaris when it's missing.