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

From Xuneng Zhou
Subject Re: Proposal: Limitations of palloc inside checkpointer
Date
Msg-id CABPTF7XG_TcoSiEUb4GHKeX4ugaU4Pd9Q6CukJcOJVtOFhFOHg@mail.gmail.com
Whole thread Raw
In response to Proposal: Limitations of palloc inside checkpointer  (Ekaterina Sokolova <e.sokolova@postgrespro.ru>)
List pgsql-hackers
Hi,

Thanks for the feedback!

> I think it would be good start point to use the same batch size of
> CompactCheckpointerRequestQueue() and AbsorbSyncRequests()
>

So we’ll keep both batch processing and the request cap in place for now.

> > > Right, but another point is to avoid lengthy holding of
> > > CheckpointerCommLock.  What do you think about that?
> >
> > I am not clear on this. Could you elaborate on it?
>
> See [1] for more detailed description of this.

> Links.
> 1. https://www.postgresql.org/message-id/flat/db4534f83a22a29ab5ee2566ad86ca92%40postgrespro.ru

I read the thread but didn’t find a specific explanation of avoiding
long lock holds. My understanding is: when compaction processes a very
large queue in one go, it holds CheckpointerCommLock the entire time,
blocking all ForwardSyncRequest callers. Batch processing would
release the lock after each chunk, allowing other backends to make
progress. Is that correct?



pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Some questions about gin index
Next
From: Andrei Lepikhov
Date:
Subject: Re: MergeAppend could consider sorting cheapest child path