]> git.ipfire.org Git - thirdparty/postgresql.git/commit
pgstat: Create memory contexts below TopMemoryContext
authorAndres Freund <andres@anarazel.de>
Fri, 16 Sep 2022 21:08:40 +0000 (14:08 -0700)
committerAndres Freund <andres@anarazel.de>
Sat, 17 Sep 2022 16:06:47 +0000 (09:06 -0700)
commitfb503793ef50eb16eb1924251d2ed58e1621eeb3
tree463a8b14b53de59e30f75902f73e572b088a605e
parent23bcc8d877efde5cbbfe50bbbf12a96434e41f36
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-
src/backend/utils/activity/pgstat.c
src/backend/utils/activity/pgstat_shmem.c