pgsql: Allow specifying initial and maximum segment sizes for DSA.

From: Masahiko Sawada <msawada(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow specifying initial and maximum segment sizes for DSA.
Date: 2024-03-27 02:44:54
Message-ID: E1rpJHa-005rR0-DE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow specifying initial and maximum segment sizes for DSA.

Previously, the DSA segment size always started with 1MB and grew up
to DSA_MAX_SEGMENT_SIZE. It was inconvenient in certain scenarios,
such as when the caller desired a soft constraint on the total DSA
segment size, limiting it to less than 1MB.

This commit introduces the capability to specify the initial and
maximum DSA segment sizes when creating a DSA area, providing more
flexibility and control over memory usage.

Reviewed-by: John Naylor, Tomas Vondra
Discussion: https://postgr.es/m/CAD21AoAYGGC1ePjVX0H%2Bpp9rH%3D9vuPK19nNOiu12NprdV5TVJA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/bb952c8c8b13279eca039499249cb5dc60991603

Modified Files
--------------
src/backend/utils/mmgr/dsa.c | 63 ++++++++++++++++++++------------------------
src/include/utils/dsa.h | 46 +++++++++++++++++++++++++++++---
2 files changed, 71 insertions(+), 38 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2024-03-27 03:59:52 pgsql: Change last_inactive_time to inactive_since in pg_replication_sl
Previous Message Nathan Bossart 2024-03-27 01:29:06 pgsql: Fix compiler warning for pg_lfind32().