pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pgstat: Create memory contexts below TopMemoryContext
2+ messages / 1 participants
[nested] [flat]

* pgsql: pgstat: Create memory contexts below TopMemoryContext
@ 2022-09-17 16:09 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Andres Freund @ 2022-09-17 16:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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-

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d3ebba729ebaf5882a92f0f5f662a3312037605

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: pgstat: Create memory contexts below TopMemoryContext
@ 2022-09-17 16:09 Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Andres Freund @ 2022-09-17 16:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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-

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(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-09-17 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-17 16:09 pgsql: pgstat: Create memory contexts below TopMemoryContext Andres Freund <andres@anarazel.de>
2022-09-17 16:09 pgsql: pgstat: Create memory contexts below TopMemoryContext Andres Freund <andres@anarazel.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox