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

Commit2f9907c

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 parentdffc6c8 commit2f9907c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/backend/replication/walsender.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include"storage/fd.h"
4848
#include"storage/ipc.h"
4949
#include"storage/pmsignal.h"
50+
#include"storage/proc.h"
5051
#include"tcop/tcopprot.h"
5152
#include"utils/guc.h"
5253
#include"utils/memutils.h"
@@ -844,7 +845,7 @@ WalSndSignals(void)
844845
pqsignal(SIGINT,SIG_IGN);/* not used */
845846
pqsignal(SIGTERM,WalSndShutdownHandler);/* request shutdown */
846847
pqsignal(SIGQUIT,WalSndQuickDieHandler);/* hard crash time */
847-
pqsignal(SIGALRM,SIG_IGN);
848+
pqsignal(SIGALRM,handle_sig_alarm);
848849
pqsignal(SIGPIPE,SIG_IGN);
849850
pqsignal(SIGUSR1,SIG_IGN);/* not used */
850851
pqsignal(SIGUSR2,WalSndLastCycleHandler);/* request a last cycle and

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp