diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2016-12-07 09:47:43 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2016-12-07 09:47:43 +0200 |
commit | 81f2e514a9b2d813bb5fd6b62523757aa7a6517f (patch) | |
tree | a22d2046bda98aa42adf2eb4ff84879b43de3883 | |
parent | 9790b87f594565c11599b2004466169b8c2fd4af (diff) | |
download | postgresql-81f2e514a9b2d813bb5fd6b62523757aa7a6517f.tar.gz postgresql-81f2e514a9b2d813bb5fd6b62523757aa7a6517f.zip |
Fix query cancellation.
In commit fe0a0b59, 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.
-rw-r--r-- | src/backend/postmaster/postmaster.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index f0ed5233711..59073e0354b 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -2216,7 +2216,7 @@ processCancelRequest(Port *port, void *pkt) { CancelRequestPacket *canc = (CancelRequestPacket *) pkt; int backendPID; - long cancelAuthCode; + int32 cancelAuthCode; Backend *bp; #ifndef EXEC_BACKEND @@ -2226,7 +2226,7 @@ processCancelRequest(Port *port, void *pkt) #endif backendPID = (int) ntohl(canc->backendPID); - cancelAuthCode = (long) ntohl(canc->cancelAuthCode); + cancelAuthCode = (int32) ntohl(canc->cancelAuthCode); /* * See if we have a matching backend. In the EXEC_BACKEND case, we can no |