Allocate Backend structs in PostmasterContext.

Heikki Linnakangas <heikki.linnakangas@iki.fi>

Commit: 0bbafb534275686e780aae2964382e56321c61af
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Date: 2023-10-09T08:29:39Z
Releases: 17.0
Allocate Backend structs in PostmasterContext.

The child processes don't need them. By allocating them in
PostmasterContext, the memory gets free'd and is made available for
other stuff in the child processes.

Reviewed-by: Thomas Munro
Discussion: https://www.postgresql.org/message-id/4f95c1fc-ad3c-7974-3a8c-6faa3931804c@iki.fi

Files

PathChange+/−
src/backend/postmaster/bgworker.c modified +8 −3
src/backend/postmaster/postmaster.c modified +11 −13

Discussion