diff options
author | Tomas Vondra <tomas.vondra@postgresql.org> | 2025-04-02 17:08:34 +0200 |
---|---|---|
committer | Tomas Vondra <tomas.vondra@postgresql.org> | 2025-04-02 17:14:28 +0200 |
commit | 46df9487d973d00c83a7962935063f3a6518939c (patch) | |
tree | 4f2b95a76e597a3b1d1a30d240e805d4846fa0b2 /src/backend/executor/nodeHash.c | |
parent | f5930f9a98ea65d659d41600a138e608988ad122 (diff) | |
download | postgresql-46df9487d973d00c83a7962935063f3a6518939c.tar.gz postgresql-46df9487d973d00c83a7962935063f3a6518939c.zip |
Improve accounting for PredXactList, RWConflictPool and PGPROC
Various places allocated shared memory by first allocating a small chunk
using ShmemInitStruct(), followed by ShmemAlloc() calls to allocate more
memory. Unfortunately, ShmemAlloc() does not update ShmemIndex, so this
affected pg_shmem_allocations - it only shown the initial chunk.
This commit modifies the following allocations, to allocate everything
as a single chunk, and then split it internally.
- PredXactList
- RWConflictPool
- PGPROC structures
- Fast-Path Lock Array
The fast-path lock array is allocated separately, not as a part of the
PGPROC structures allocation.
Author: Rahila Syed <rahilasyed90@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reviewed-by: Tomas Vondra <tomas@vondra.me>
Discussion: https://postgr.es/m/CAH2L28vHzRankszhqz7deXURxKncxfirnuW68zD7+hVAqaS5GQ@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeHash.c')
0 files changed, 0 insertions, 0 deletions