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

Commitd066cc5

Browse files
committed
Fix walsender processes to establish a SIGALRM handler.
Walsenders must have working SIGALRM handling during InitPostgres,but they set the handler to SIG_IGN so that nothing would happenif a timeout was reached. This could result in two failure modes:* If a walsender participated in a deadlock during its authenticationtransaction, and was the last to wait in the deadly embrace, the deadlockwould not get cleared automatically. This would require somebody to betrying to take out AccessExclusiveLock on multiple system catalogs, soit's not very probable.* If a client failed to respond to a walsender's authentication challenge,the intended disconnect after AuthenticationTimeout wouldn't happen, andthe walsender would wait indefinitely for the client.For the moment, fix in back branches only, since this is fixed in adifferent way in the timeout-infrastructure patch that's awaitingapplication to HEAD. If we choose not to apply that, then we'll needto do this in HEAD as well.
1 parenta9287de commitd066cc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/replication/walsender.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ WalSndSignals(void)
12841284
pqsignal(SIGINT,SIG_IGN);/* not used */
12851285
pqsignal(SIGTERM,WalSndShutdownHandler);/* request shutdown */
12861286
pqsignal(SIGQUIT,WalSndQuickDieHandler);/* hard crash time */
1287-
pqsignal(SIGALRM,SIG_IGN);
1287+
pqsignal(SIGALRM,handle_sig_alarm);
12881288
pqsignal(SIGPIPE,SIG_IGN);
12891289
pqsignal(SIGUSR1,WalSndXLogSendHandler);/* request WAL sending */
12901290
pqsignal(SIGUSR2,WalSndLastCycleHandler);/* request a last cycle and

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp