summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas2025-04-09 10:11:42 +0000
committerHeikki Linnakangas2025-04-09 10:11:42 +0000
commit0f1433f05356e8de7c4125e5192a54355e12359d (patch)
tree107f33b9f468eacfbbe5c2fd07800625b6972a2e
parentef366b7d7e3e66ca55ce80c9dfa3254ada727754 (diff)
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 <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected]
-rw-r--r--src/backend/postmaster/auxprocess.c2
-rw-r--r--src/backend/utils/init/globals.c2
-rw-r--r--src/include/miscadmin.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/postmaster/auxprocess.c b/src/backend/postmaster/auxprocess.c
index 4f6795f7265..a6d3630398f 100644
--- a/src/backend/postmaster/auxprocess.c
+++ b/src/backend/postmaster/auxprocess.c
@@ -66,7 +66,7 @@ AuxiliaryProcessMainCommon(void)
BaseInit();
- ProcSignalInit(false, 0);
+ ProcSignalInit(NULL, 0);
/*
* Auxiliary processes don't run transactions, but they may need a
diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c
index 92304a1f124..1847e7c85d3 100644
--- a/src/backend/utils/init/globals.c
+++ b/src/backend/utils/init/globals.c
@@ -51,7 +51,7 @@ TimestampTz MyStartTimestamp;
struct ClientSocket *MyClientSocket;
struct Port *MyProcPort;
char MyCancelKey[MAX_CANCEL_KEY_LENGTH];
-uint8 MyCancelKeyLength = 0;
+int MyCancelKeyLength = 0;
int MyPMChildSlot;
/*
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index 58b2496a9cb..72f5655fb34 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -193,7 +193,7 @@ extern PGDLLIMPORT TimestampTz MyStartTimestamp;
extern PGDLLIMPORT struct Port *MyProcPort;
extern PGDLLIMPORT struct Latch *MyLatch;
extern PGDLLIMPORT char MyCancelKey[];
-extern PGDLLIMPORT uint8 MyCancelKeyLength;
+extern PGDLLIMPORT int MyCancelKeyLength;
extern PGDLLIMPORT int MyPMChildSlot;
extern PGDLLIMPORT char OutputFileName[];