pgsql: Avoid creating parallel apply state hash table unless required.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid creating parallel apply state hash table unless required.
Date: 2023-01-13 03:13:45
Message-ID: E1pGAVl-003Oag-3F@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dca8b01f5f1f7c83c59a16393724fbd8a29ddecb

Modified Files
--------------
src/backend/replication/logical/applyparallelworker.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2023-01-13 09:41:29 pgsql: Ignore dropped and generated columns from the column list.
Previous Message Amit Langote 2023-01-13 02:52:50 Re: pgsql: Improve handling of inherited GENERATED expressions.