Re: Changing shared_buffers without restart

2025-04-18 Thread Ni Ku
Hi Ashutosh / Dmitry, Thanks for the information and discussions, it's been very helpful. I also have a related question about how ftruncate() is used in the patch. In my testing I also see that when using ftruncate to shrink a shared segment, the memory is freed immediately after the call, even

Re: Changing shared_buffers without restart

2025-04-04 Thread Ni Ku
mind ;) Regards, Jack Ng On Thu, Mar 20, 2025 at 6:21 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On Thu, Mar 20, 2025 at 04:55:47PM GMT, Ni Ku wrote: > > > > I ran some simple tests (outside of PG) on linux kernel v6.1, which has > > this commit that

Re: Changing shared_buffers without restart

2025-03-21 Thread Ni Ku
2025 at 5:31 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On Fri, Mar 21, 2025 at 04:48:30PM GMT, Ni Ku wrote: > > Thanks for your insights and confirmation, Dmitry. > > Right, I think the anonymous fd approach would work to keep the memory > > contents intact

Re: Changing shared_buffers without restart

2025-03-20 Thread Ni Ku
Dmitry / Ashutosh, Thanks for the patch set. I've been doing some testing with it and in particular want to see if this solution would work with hugepage bufferpool. I ran some simple tests (outside of PG) on linux kernel v6.1, which has this commit that added some hugepage support to mremap ( htt