Re: Changing shared_buffers without restart
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Thom Brown <thom@linux.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>,
Tomas Vondra <tomas@vondra.me>, Thomas Munro <thomas.munro@gmail.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>, Jack Ng <Jack.Ng@huawei.com>, Ni Ku <jakkuniku@gmail.com>
Date: 2025-07-14T12:56:56Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove PG_MMAP_FLAGS from mem.h
- c100340729b6 19 (unreleased) landed
-
Improve runtime and output of tests for replication slots checkpointing.
- 4464fddf7b50 18.0 cited
-
Revert support for improved tracking of nested queries
- f85f6ab051b7 18.0 cited
-
Use exported symbols list on macOS for loadable modules as well
- 3feff3916ee1 18.0 cited
-
Add support for basic NUMA awareness
- 65c298f61fc7 18.0 cited
-
Avoid unnecessary copying of a string in pg_restore.c
- 5e1915439085 18.0 cited
-
aio: Infrastructure for io_method=worker
- 55b454d0e140 18.0 cited
-
Improve InitShmemAccess() prototype
- 2a7b2d97171d 18.0 landed
Hi, On 2025-07-14 11:32:25 +0200, Dmitry Dolgov wrote: > > On Mon, Jul 14, 2025 at 10:24:50AM +0100, Thom Brown wrote: > > On Mon, 14 Jul 2025, 09:54 Dmitry Dolgov, <9erthalion6@gmail.com> wrote: > > > > > > On Mon, Jul 14, 2025 at 01:55:39PM +0530, Ashutosh Bapat wrote: > > > > > You're right of course, a buffer id could be returned from the > > > > > ClockSweep and from the custom strategy buffer ring. Buf from what I > > > see > > > > > those are picking a buffer from the set of already utilized buffers, > > > > > meaning that for a buffer to land there it first has to go through > > > > > StrategyControl->firstFreeBuffer, and hence the idea above will be a > > > > > requirement for those as well. > > > > > > > > That isn't true. A buffer which was never in the free list can still > > > > be picked up by clock sweep. > > > > > > How's that? > > > > > > > Isn't it its job to find usable buffers from the used buffer list when no > > free ones are available? The next victim buffer can be selected (and > > cleaned if dirty) and then immediately used without touching the free list. > > Ah, I see what you mean folks. But I'm talking here only about buffers > which will be allocated after extending shared memory -- they must go > through the freelist first (I don't see why not, any other options?), > and clock sweep will have a chance to pick them up only afterwards. That > makes the freelist sort of an entry point for those buffers. Clock sweep can find any buffer, independent of whether it's on the freelist.