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: Thomas Munro <thomas.munro@gmail.com>, pgsql-hackers@postgresql.org, Robert Haas <robertmhaas@gmail.com>
Date: 2025-10-01T10:42:38Z
Lists: pgsql-hackers
> On Wed, Oct 01, 2025 at 03:50:17PM +0530, Ashutosh Bapat wrote: > The buffer lookup table itself. > /* Pass location of hashtable header to hash_create */ > infoP->hctl = (HASHHDR *) location; How does this affect any users of the lookup table, if they do not even get to see those? > > Shared buffer lookup table already lives in it's own segment as > > implemented in the current patch, so I don't see any problem here. > > The table is not a single chunk of memory. It's a few chunks spread > across the shared memory segment. Freeing a lookup table is like > freeing those chunks. We have ways to free tail parts of shared memory > segments, but not chunks in-between. Right, and the idea was to rebuild it completely to fit into the new size, not just chunk-by-chunk.