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

Commitf62ab62

Browse files
committed
Fix SIGUSR1 handling by unconnected bgworkers
Latch activity was not being detected by non-database-connected workers; theSIGUSR1 signal handler which is normally in charge of that was set to SIG_IGN.Create a simple handler to call latch_sigusr1_handler instead.Robert Haas (bug report and suggested fix)
1 parent61a7d57 commitf62ab62

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5354,6 +5354,22 @@ bgworker_die(SIGNAL_ARGS)
53545354
MyBgworkerEntry->bgw_name)));
53555355
}
53565356

5357+
/*
5358+
* Standard SIGUSR1 handler for unconnected workers
5359+
*
5360+
* Here, we want to make sure an unconnected worker will at least heed
5361+
* latch activity.
5362+
*/
5363+
staticvoid
5364+
bgworker_sigusr1_handler(SIGNAL_ARGS)
5365+
{
5366+
intsave_errno=errno;
5367+
5368+
latch_sigusr1_handler();
5369+
5370+
errno=save_errno;
5371+
}
5372+
53575373
staticvoid
53585374
do_start_bgworker(void)
53595375
{
@@ -5410,7 +5426,7 @@ do_start_bgworker(void)
54105426
else
54115427
{
54125428
pqsignal(SIGINT,SIG_IGN);
5413-
pqsignal(SIGUSR1,SIG_IGN);
5429+
pqsignal(SIGUSR1,bgworker_sigusr1_handler);
54145430
pqsignal(SIGFPE,SIG_IGN);
54155431
}
54165432

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp