Re: Proposal: Limitations of palloc inside checkpointer

Поиск
Список
Период
Сортировка
От Maxim Orlov
Тема Re: Proposal: Limitations of palloc inside checkpointer
Дата
Msg-id CACG=ezZJGhJgZEKc3arPFKMUWjmXLFt_GeaMTqXcMxQPfR31jg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal: Limitations of palloc inside checkpointer  (Maxim Orlov <orlovmg@gmail.com>)
Ответы Re: Proposal: Limitations of palloc inside checkpointer
Список pgsql-hackers
I tried to implement the idea (4). This is the patch.

But, there is a problem. See, when we release lock and call RememberSyncRequest() and acquire it again, CompactCheckpointerRequestQueue() may be called and the state of the request array may be changed. Of course, we can recheck num_requests after retaking the lock and restart the algo all over again. But this is not a great idea, since we can stuck in this loop if someone is pushing requests in the queue.

As for case (3). In fact, the described problem happens only with high enough values of NBuffers. Thus, user already expected postgres to use huge amount of RAM. Is this really a problem if he will demand some more to process sync request?

--
Best regards,
Maxim Orlov.
Вложения

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