Skip to content

Commit 0f1433f

Browse files
committed
Fix a few oversights in the longer cancel keys patch
Change MyCancelKeyLength's type from uint8 to int. While it always fits in a uint8, plain int is less surprising, as there's no particular reason for it to be uint8. Fix one ProcSignalInit caller that passed 'false' instead of NULL for the pointer argument. Author: Peter Eisentraut <peter@eisentraut.org> Discussion: https://www.postgresql.org/message-id/61be9e31-7b7d-49d5-bc11-721800d89d64@eisentraut.org
1 parent ef366b7 commit 0f1433f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/backend/postmaster/auxprocess.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ AuxiliaryProcessMainCommon(void)
6666

6767
BaseInit();
6868

69-
ProcSignalInit(false, 0);
69+
ProcSignalInit(NULL, 0);
7070

7171
/*
7272
* Auxiliary processes don't run transactions, but they may need a

src/backend/utils/init/globals.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ TimestampTz MyStartTimestamp;
5151
struct ClientSocket *MyClientSocket;
5252
struct Port *MyProcPort;
5353
char MyCancelKey[MAX_CANCEL_KEY_LENGTH];
54-
uint8 MyCancelKeyLength = 0;
54+
int MyCancelKeyLength = 0;
5555
int MyPMChildSlot;
5656

5757
/*

src/include/miscadmin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ extern PGDLLIMPORT TimestampTz MyStartTimestamp;
193193
extern PGDLLIMPORT struct Port *MyProcPort;
194194
extern PGDLLIMPORT struct Latch *MyLatch;
195195
extern PGDLLIMPORT char MyCancelKey[];
196-
extern PGDLLIMPORT uint8 MyCancelKeyLength;
196+
extern PGDLLIMPORT int MyCancelKeyLength;
197197
extern PGDLLIMPORT int MyPMChildSlot;
198198

199199
extern PGDLLIMPORT char OutputFileName[];

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy