Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b3d5b68

Browse files
committed
Have walsenders participate in procsignal infrastructure.
The non-participation in procsignal was a problem for both changes in master, e.g. parallelism not working for normal statements run in walsender backends, and older branches, e.g. recovery conflicts and catchup interrupts not working for logical decoding walsenders. This commit thus replaces the previous WalSndXLogSendHandler with procsignal_sigusr1_handler. In branches since db0f6ca that can lead to additional SetLatch calls, but that only rarely seems to make a difference. Author: Andres Freund Reviewed-By: Michael Paquier Discussion: https://postgr.es/m/20170421014030.fdzvvvbrz4nckrow@alap3.anarazel.de Backpatch: 9.4, earlier commits don't seem to benefit sufficiently
1 parent ec504af commit b3d5b68

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/backend/replication/walsender.c

+1-13
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ static XLogRecPtr logical_startptr = InvalidXLogRecPtr;
186186

187187
/* Signal handlers */
188188
static void WalSndSigHupHandler(SIGNAL_ARGS);
189-
static void WalSndXLogSendHandler(SIGNAL_ARGS);
190189
static void WalSndLastCycleHandler(SIGNAL_ARGS);
191190

192191
/* Prototypes for private functions */
@@ -2577,17 +2576,6 @@ WalSndSigHupHandler(SIGNAL_ARGS)
25772576
errno = save_errno;
25782577
}
25792578

2580-
/* SIGUSR1: set flag to send WAL records */
2581-
static void
2582-
WalSndXLogSendHandler(SIGNAL_ARGS)
2583-
{
2584-
int save_errno = errno;
2585-
2586-
latch_sigusr1_handler();
2587-
2588-
errno = save_errno;
2589-
}
2590-
25912579
/* SIGUSR2: set flag to do a last cycle and shut down afterwards */
25922580
static void
25932581
WalSndLastCycleHandler(SIGNAL_ARGS)
@@ -2621,7 +2609,7 @@ WalSndSignals(void)
26212609
pqsignal(SIGQUIT, quickdie); /* hard crash time */
26222610
InitializeTimeouts(); /* establishes SIGALRM handler */
26232611
pqsignal(SIGPIPE, SIG_IGN);
2624-
pqsignal(SIGUSR1, WalSndXLogSendHandler); /* request WAL sending */
2612+
pqsignal(SIGUSR1, procsignal_sigusr1_handler);
26252613
pqsignal(SIGUSR2, WalSndLastCycleHandler); /* request a last cycle and
26262614
* shutdown */
26272615

0 commit comments

Comments
 (0)