Re: Changing shared_buffers without restart
Dmitry Dolgov <9erthalion6@gmail.com>
From: Dmitry Dolgov <9erthalion6@gmail.com>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: pgsql-hackers@postgresql.org, Robert Haas <robertmhaas@gmail.com>
Date: 2025-04-14T07:20:44Z
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
> On Mon, Apr 14, 2025 at 10:40:28AM GMT, Ashutosh Bapat wrote: > > However, when we put back the patches to shrink buffers, we will evict > the extra buffers, and shrink - if all the processes haven't > participated in the barrier by then, some of them may try to access > those buffers - re-installing them and then bad things can happen. As I've mentioned above, I don't see how a process could try to access a buffer, if it's on the path between receiving the ProcSignalBarrier and attaching to the global shmem Barrier, even if we shrink buffers. AFAICT interrupt handles should not touch buffers, and otherwise the process doesn't have any point withing this window where it might do this. Do you have some particular scenario in mind? > I might have not noticed it, but are we putting two mappings one > reserved and one allocated in the same address space, so that when the > allocated mapping shrinks or expands, the reserved mapping continues > to prohibit any other mapping from appearing there? I looked at some > of the previous emails, but didn't find anything that describes how > the reserved mapped space is managed. I though so, but this turns out to be incorrect. Just have done a small experiment -- looks like when reserving some space, mapping and unmapping a small segment from it leaves a non-mapped gap. That would mean for shrinking the new available space has to be reserved again.