Re: Changing shared_buffers without restart
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Dmitry Dolgov <9erthalion6@gmail.com>,
pgsql-hackers@postgresql.org
Date: 2024-11-29T01:42:47Z
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
Matthias van de Meent <boekewurm+postgres@gmail.com> writes: > I mean, we can do the following to get a nice contiguous empty address > space no other mmap(NULL)s will get put into: > /* reserve size bytes of memory */ > base = mmap(NULL, size, PROT_NONE, ...flags, ...); > /* use the first small_size bytes of that reservation */ > allocated_in_reserved = mmap(base, small_size, PROT_READ | > PROT_WRITE, MAP_FIXED, ...); > With the PROT_NONE protection option the OS doesn't actually allocate > any backing memory, but guarantees no other mmap(NULL, ...) will get > placed in that area such that it overlaps with that allocation until > the area is munmap-ed, thus allowing us to reserve a chunk of address > space without actually using (much) memory. Well, that's all great if it works portably. But I don't see one word in either POSIX or the Linux mmap(2) man page that promises those semantics for PROT_NONE. I also wonder how well a giant chunk of "unbacked" address space will interoperate with the OOM killer, top(1)'s display of used memory, and other things that have caused us headaches with large shared-memory arenas. Maybe those issues are all in the past and this'll work great. I'm not holding my breath though. regards, tom lane