pgstat: Create memory contexts below TopMemoryContext
Andres Freund <andres@anarazel.de>
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.thompson@crunchydata.com> Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Author: "Drouvot, Bertrand" <bdrouvot@amazon.com> Discussion: https://postgr.es/m/b948b729-42fe-f88c-2f4a-0e65d84c049b@amazon.com Backpatch: 15-
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/activity/pgstat.c | modified | +1 −1 |
| src/backend/utils/activity/pgstat_shmem.c | modified | +2 −2 |
Discussion
- Patch to address creation of PgStat* contexts with null parent context 19 messages · 2022-06-30 → 2022-09-19