Avoid creating parallel apply state hash table unless required.
Amit Kapila <akapila@postgresql.org>
Avoid creating parallel apply state hash table unless required. This hash table is used to cache the state of streaming transactions being applied by the parallel apply workers. So, this should be created only when we are successful in launching at least one worker. This avoids rare case memory leak when we are never able to launch any worker. Author: Ted Yu Discussion: https://postgr.es/m/CALte62wg0rBR3Vj2beV=HiWo2qG9L0hzKcX=yULNER0wmf4aEw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/logical/applyparallelworker.c | modified | +4 −4 |
Discussion
- releasing ParallelApplyTxnHash when pa_launch_parallel_worker returns NULL 11 messages · 2023-01-10 → 2023-01-13