Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52144b6

Browse files
committed
Use correct connection for cancellation in frontend's parallel slots
While waiting for slots to become available in wait_on_slots() inparallel_slot.c, the cancellation always relied on the first connectionin the set to do the job. This could cause problems when this slot'ssocket is gone as PQgetCancel() would return NULL in this case. Ratherthan always using the first connection, this changes the logic to usethe first valid connection for the cancellation.Author: Ranier VilelaReviewed-by: Justin PryzbyDiscussion:https://postgr.es/m/CAEudQAokk1h_pUwGXsYS4oVOuf35s1O2o3TXGHpV8=AWikvgHA@mail.gmail.comBackpatch-through: 14
1 parente890ce7 commit52144b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/fe_utils/parallel_slot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ wait_on_slots(ParallelSlotArray *sa)
235235
if (cancelconn==NULL)
236236
return false;
237237

238-
SetCancelConn(sa->slots->connection);
238+
SetCancelConn(cancelconn);
239239
i=select_loop(maxFd,&slotset);
240240
ResetCancelConn();
241241

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp