pgsql: Allocate Backend structs in PostmasterContext.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allocate Backend structs in PostmasterContext.
Date: 2023-10-09 08:52:41
Message-ID: E1qpm0G-000lfg-P5@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0bbafb534275686e780aae2964382e56321c61af

Modified Files
--------------
src/backend/postmaster/bgworker.c | 11 ++++++++---
src/backend/postmaster/postmaster.c | 24 +++++++++++-------------
2 files changed, 19 insertions(+), 16 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2023-10-09 15:31:10 pgsql: Doc: use CURRENT_USER not USER in plpgsql trigger examples.
Previous Message David Rowley 2023-10-09 04:25:39 pgsql: Optimize various aggregate deserialization functions