Re: [REVIEW] Re: Compression of full-page-writes

Поиск
Список
Период
Сортировка
От Abhijit Menon-Sen
Тема Re: [REVIEW] Re: Compression of full-page-writes
Дата
Msg-id 20140618125534.GA18575@toroid.org
обсуждение исходный текст
Ответ на Re: [REVIEW] Re: Compression of full-page-writes  (Rahila Syed <rahilasyed90@gmail.com>)
Ответы Re: [REVIEW] Re: Compression of full-page-writes
Re: [REVIEW] Re: Compression of full-page-writes
Список pgsql-hackers
At 2014-06-18 18:10:34 +0530, rahilasyed90@gmail.com wrote:
>
> palloc() is disallowed in critical sections and we are already in CS
> while executing this code. So we use malloc().

Are these allocations actually inside a critical section? It seems to me
that the critical section starts further down, but perhaps I am missing
something.

Second, as Andres says, you shouldn't malloc() inside a critical section
either; and anyway, certainly not without checking the return value.

> I am not sure if the change will be a significant improvement from
> performance point of view except it will save few condition checks.

Moving that allocation out of the outer for loop it's currently in is
*nothing* to do with performance, but about making the code easier to
read.

-- Abhijit



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [REVIEW] Re: Compression of full-page-writes
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: [REVIEW] Re: Compression of full-page-writes