Re: Some shared memory chunks are allocated even if related processes won't start - Mailing list pgsql-hackers

From 'Alvaro Herrera'
Subject Re: Some shared memory chunks are allocated even if related processes won't start
Date
Msg-id 202403041152.fl4psozsstnt@alvherre.pgsql
Whole thread Raw
In response to RE: Some shared memory chunks are allocated even if related processes won't start  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses RE: Some shared memory chunks are allocated even if related processes won't start
List pgsql-hackers
On 2024-Mar-04, Hayato Kuroda (Fujitsu) wrote:

> However, the second idea is still valid, which allows the allocation
> of shared memory dynamically. This is a bit efficient for the system
> which tuples won't be frozen. Thought?

I think it would be worth allocating AutoVacuumShmem->av_workItems using
dynamic shmem allocation, particularly to prevent workitems from being
discarded just because the array is full¹; but other than that, the
struct is just 64 bytes long so I doubt it's useful to allocate it
dynamically.

¹ I mean, if the array is full, just allocate another array, point to it
from the original one, and keep going.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"The problem with the facetime model is not just that it's demoralizing, but
that the people pretending to work interrupt the ones actually working."
                  -- Paul Graham, http://www.paulgraham.com/opensource.html



pgsql-hackers by date:

Previous
From: "Andrey M. Borodin"
Date:
Subject: Re: CF entries for 17 to be reviewed
Next
From: Mats Kindahl
Date:
Subject: Hooking into ExplainOneQuery() complicated by missing standard_ExplainOneQuery