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

Commit9553d0f

Browse files
committed
Ignore interrupts during quickdie().
Once the administrator has called for an immediate shutdown or a backendcrash has triggered a reinitialization, no mere SIGINT or SIGTERM shouldchange that course. Such derailment remains possible when the signalarrives before quickdie() blocks signals. That being a narrow raceaffecting most PostgreSQL signal handlers in some way, leave it foranother patch. Back-patch this to all supported versions.
1 parent994f68d commit9553d0f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,6 +2610,13 @@ quickdie(SIGNAL_ARGS)
26102610
sigaddset(&BlockSig,SIGQUIT);/* prevent nested calls */
26112611
PG_SETMASK(&BlockSig);
26122612

2613+
/*
2614+
* Prevent interrupts while exiting; though we just blocked signals that
2615+
* would queue new interrupts, one may have been pending. We don't want a
2616+
* quickdie() downgraded to a mere query cancel.
2617+
*/
2618+
HOLD_INTERRUPTS();
2619+
26132620
/*
26142621
* If we're aborting out of client auth, don't risk trying to send
26152622
* anything to the client; we will likely violate the protocol, not to

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp