mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
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
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user