pgsql: pgstat: Create memory contexts below TopMemoryContext

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pgstat: Create memory contexts below TopMemoryContext
Date: 2022-09-17 16:09:42
Message-ID: E1oZaNx-000lpP-HY@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pgstat: Create memory contexts below TopMemoryContext

So far they were created below CacheMemoryContext. However, that's not
guaranteed to exist in all situations, leading to memory contexts created as
top-level contexts. There isn't actually a good reason anymore to create them
below CacheMemoryContext, so just creating them below TopMemoryContext seems
the best approach.

Reported-by: Reid Thompson <reid(dot)thompson(at)crunchydata(dot)com>
Reviewed-by: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Author: "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>
Discussion: https://postgr.es/m/b948b729-42fe-f88c-2f4a-0e65d84c049b@amazon.com
Backpatch: 15-

Branch
------
REL_15_STABLE

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

Modified Files
--------------
src/backend/utils/activity/pgstat.c | 2 +-
src/backend/utils/activity/pgstat_shmem.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2022-09-17 16:18:28 pgsql: Remove DLLTOOL, DLLWRAP from configure / Makefile.global.in
Previous Message Tom Lane 2022-09-17 14:44:02 Re: pgsql: Fix createdb tests for C locale