Re: Proposal: Limitations of palloc inside checkpointer - Mailing list pgsql-hackers

From Maxim Orlov
Subject Re: Proposal: Limitations of palloc inside checkpointer
Date
Msg-id CACG=ezZ5_TvRtt-a3hwANDGzbHOVXFsr6vPGSgV7WdJyM6tgXw@mail.gmail.com
Whole thread Raw
In response to Proposal: Limitations of palloc inside checkpointer  (Ekaterina Sokolova <e.sokolova@postgrespro.ru>)
Responses Re: Proposal: Limitations of palloc inside checkpointer
List pgsql-hackers


On Tue, 25 Feb 2025 at 22:44, Ekaterina Sokolova <e.sokolova@postgrespro.ru> wrote:
Hi, hackers!

Historically, the checkpointer process use palloc() into
AbsorbSyncRequests() function. Therefore, the checkpointer does not
expect to receive a request larger than 1 GB.

Yeah. And the most unpleasant thing is it won't simply fail with an error or helpful message suggesting a workaround (reduce the amount of shared memory). Checkpointer will just "stuck".

AFAICS, we have a few options:
1. Leave it as it is, but fatal on allocation of the chunk more than 1G.
2. Use palloc_extended with MCXT_ALLOC_HUGE flag.
3. Do not use any allocation and use CheckpointerShmem->requests directly in case of > 1G size of the required allocation.

Case (3) is not an option, in my opinion. So, we following (1) or (2). Personally, I'm for (2), PFA v0 patch.


--
Best regards,
Maxim Orlov.
Attachment

pgsql-hackers by date:

Previous
From: Jakub Wartak
Date:
Subject: Re: Draft for basic NUMA observability
Next
From: Antonin Houska
Date:
Subject: Re: why there is not VACUUM FULL CONCURRENTLY?