Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 81f2e51

Browse files
committed
Fix query cancellation.
In commit fe0a0b5, the datatype used for MyCancelKey and other variables that store cancel keys were changed from long to uint32, but I missed this one. That broke query cancellation on platforms where long is wider than 32 bits. Report by Andres Freund, fix by Michael Paquier.
1 parent 9790b87 commit 81f2e51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/postmaster/postmaster.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,7 @@ processCancelRequest(Port *port, void *pkt)
22162216
{
22172217
CancelRequestPacket *canc = (CancelRequestPacket *) pkt;
22182218
int backendPID;
2219-
long cancelAuthCode;
2219+
int32 cancelAuthCode;
22202220
Backend *bp;
22212221

22222222
#ifndef EXEC_BACKEND
@@ -2226,7 +2226,7 @@ processCancelRequest(Port *port, void *pkt)
22262226
#endif
22272227

22282228
backendPID = (int) ntohl(canc->backendPID);
2229-
cancelAuthCode = (long) ntohl(canc->cancelAuthCode);
2229+
cancelAuthCode = (int32) ntohl(canc->cancelAuthCode);
22302230

22312231
/*
22322232
* See if we have a matching backend. In the EXEC_BACKEND case, we can no

0 commit comments

Comments
 (0)