pgsql: Use appropriate wait event when sending data in the apply worker

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use appropriate wait event when sending data in the apply worker
Date: 2023-02-07 04:40:15
Message-ID: E1pPFmA-001z05-2r@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Use appropriate wait event when sending data in the apply worker.

Currently, we reuse WAIT_EVENT_LOGICAL_PARALLEL_APPLY_STATE_CHANGE in the
apply worker while sending data to the parallel apply worker via a shared
memory queue. This is not appropriate as one won't be able to distinguish
whether the worker is waiting for sending data or for the state change.

To patch instead uses the wait event WAIT_EVENT_MQ_SEND which has been
already used in blocking mode while sending data via a shared memory
queue.

Author: Hou Zhijie
Reviewed-by: Kuroda Hayato, Amit Kapila
Discussion: https://postgr.es/m/OS0PR01MB57161C680B22E4C591628EE994DA9@OS0PR01MB5716.jpnprd01.prod.outlook.com

Branch
------
master

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

Modified Files
--------------
src/backend/replication/logical/applyparallelworker.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2023-02-07 06:13:24 pgsql: Remove useless casts to (void *) in arguments of some system fun
Previous Message David Rowley 2023-02-07 04:24:36 pgsql: More refactoring of heapgettup() and heapgettup_pagemode()

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2023-02-07 04:43:03 Re: Time delayed LR (WAS Re: logical replication restrictions)
Previous Message David Rowley 2023-02-07 04:40:13 Re: heapgettup refactoring