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

Commit5a630b6

Browse files
committed
Fix custom_signal.patch
1 parent1464f74 commit5a630b6

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

‎custom_signals.patch

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/backend/storage/ipc/procsignal.c b/src/backend/storage/ipc/procsignal.c
2-
indexa3d6ac5..60732a6 100644
2+
indexa3d6ac5318..f91a1b1422 100644
33
--- a/src/backend/storage/ipc/procsignal.c
44
+++ b/src/backend/storage/ipc/procsignal.c
55
@@ -26,6 +26,7 @@
@@ -33,7 +33,7 @@ index a3d6ac5..60732a6 100644
3333

3434
/*
3535
+ * RegisterCustomProcSignalHandler
36-
+ * Assign specific handlerof custom process signal with new ProcSignalReason key.
36+
+ * Assign specific handlerfor custom process signal with new ProcSignalReason key.
3737
+ * Return INVALID_PROCSIGNAL if all custom signals have been assigned.
3838
+ */
3939
+ProcSignalReason
@@ -62,7 +62,7 @@ index a3d6ac5..60732a6 100644
6262
+{
6363
+ProcSignalHandler_type old;
6464
+
65-
+Assert(reason >= PROCSIG_CUSTOM_1 && reason <= PROCSIG_CUSTOM_N);
65+
+AssertArg(reason >= PROCSIG_CUSTOM_1 && reason <= PROCSIG_CUSTOM_N);
6666
+
6767
+old = CustomHandlers[reason - PROCSIG_CUSTOM_1];
6868
+CustomHandlers[reason - PROCSIG_CUSTOM_1] = handler;
@@ -77,7 +77,7 @@ index a3d6ac5..60732a6 100644
7777
+ProcSignalHandler_type
7878
+GetCustomProcSignalHandler(ProcSignalReason reason)
7979
+{
80-
+Assert(reason >= PROCSIG_CUSTOM_1 && reason <= PROCSIG_CUSTOM_N);
80+
+AssertArg(reason >= PROCSIG_CUSTOM_1 && reason <= PROCSIG_CUSTOM_N);
8181
+
8282
+return CustomHandlers[reason - PROCSIG_CUSTOM_1];
8383
+}
@@ -96,7 +96,7 @@ index a3d6ac5..60732a6 100644
9696

9797
if (CheckProcSignal(PROCSIG_CATCHUP_INTERRUPT))
9898
HandleCatchupInterrupt();
99-
@@ -288,9 +346,88 @@ procsignal_sigusr1_handler(SIGNAL_ARGS)
99+
@@ -288,9 +346,87 @@ procsignal_sigusr1_handler(SIGNAL_ARGS)
100100
if (CheckProcSignal(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN))
101101
RecoveryConflictInterrupt(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN);
102102

@@ -119,7 +119,7 @@ index a3d6ac5..60732a6 100644
119119
+{
120120
+intsave_errno = errno;
121121
+
122-
+Assert(reason >= PROCSIG_CUSTOM_1 && reason <= PROCSIG_CUSTOM_N);
122+
+AssertArg(reason >= PROCSIG_CUSTOM_1 && reason <= PROCSIG_CUSTOM_N);
123123
+
124124
+/* set interrupt flags */
125125
+InterruptPending = true;
@@ -147,9 +147,8 @@ index a3d6ac5..60732a6 100644
147147
+/*
148148
+ * This is invoked from ProcessInterrupts(), and since some of the
149149
+ * functions it calls contain CHECK_FOR_INTERRUPTS(), there is a potential
150-
+ * for recursive calls if more signals are received while this runs. It's
151-
+ * unclear that recursive entry would be safe, and it doesn't seem useful
152-
+ * even if it is safe, so let's block interrupts until done.
150+
+ * for recursive calls if more signals are received while this runs, so
151+
+ * let's block interrupts until done.
153152
+ */
154153
+HOLD_INTERRUPTS();
155154
+
@@ -186,7 +185,7 @@ index a3d6ac5..60732a6 100644
186185
+RESUME_INTERRUPTS();
187186
+}
188187
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
189-
index98ccbbb..c5d649c 100644
188+
indexf6be98bdd4..5fee511676 100644
190189
--- a/src/backend/tcop/postgres.c
191190
+++ b/src/backend/tcop/postgres.c
192191
@@ -3005,6 +3005,8 @@ ProcessInterrupts(void)
@@ -199,7 +198,7 @@ index 98ccbbb..c5d649c 100644
199198

200199

201200
diff --git a/src/include/storage/procsignal.h b/src/include/storage/procsignal.h
202-
indexf67b982..e941dcb 100644
201+
indexf67b9821f2..e941dcbb69 100644
203202
--- a/src/include/storage/procsignal.h
204203
+++ b/src/include/storage/procsignal.h
205204
@@ -17,6 +17,8 @@

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp