diff options
| author | Amit Kapila <akapila@postgresql.org> | 2023-02-16 07:46:31 +0530 |
|---|---|---|
| committer | Amit Kapila <akapila@postgresql.org> | 2023-02-16 07:46:31 +0530 |
| commit | fce003cfde219b7016140f83f67ebcfdf75aa0dc (patch) | |
| tree | 620bb51220cf7add670e293c7930cff73c744606 /src/backend/replication/logical | |
| parent | 1b43743f1174a5b98f77c8090a89d829c2874441 (diff) | |
| download | postgresql-fce003cfde219b7016140f83f67ebcfdf75aa0dc.tar.gz | |
Add a new wait state and use it when sending data in the apply worker.
d9d7fe68d3 made use of an existing wait event when sending data from the
apply worker, but we should have invented a new wait event since this is a
new place to wait.
This patch corrects the mistake by using a new wait event
"LogicalApplySendData".
Author: Hou Zhijie
Reviewed-by: Peter Smith
Discussion: https://postgr.es/m/CA+TgmobWzbr9H3yN3dLVckviEZKemPwd+XyCFKEgyZQZhgP66Q@mail.gmail.com
Diffstat (limited to 'src/backend/replication/logical')
| -rw-r--r-- | src/backend/replication/logical/applyparallelworker.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/logical/applyparallelworker.c b/src/backend/replication/logical/applyparallelworker.c index da437e0bc3..4518683779 100644 --- a/src/backend/replication/logical/applyparallelworker.c +++ b/src/backend/replication/logical/applyparallelworker.c @@ -1181,7 +1181,8 @@ pa_send_data(ParallelApplyWorkerInfo *winfo, Size nbytes, const void *data) /* Wait before retrying. */ rc = WaitLatch(MyLatch, WL_LATCH_SET | WL_TIMEOUT | WL_EXIT_ON_PM_DEATH, - SHM_SEND_RETRY_INTERVAL_MS, WAIT_EVENT_MQ_SEND); + SHM_SEND_RETRY_INTERVAL_MS, + WAIT_EVENT_LOGICAL_APPLY_SEND_DATA); if (rc & WL_LATCH_SET) { |
