diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/postmaster/bgworker.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c index beb5e85434c..d043ced6861 100644 --- a/src/backend/postmaster/bgworker.c +++ b/src/backend/postmaster/bgworker.c @@ -743,7 +743,7 @@ StartBackgroundWorker(void) /* * If an exception is encountered, processing resumes here. * - * See notes in postgres.c about the design of this coding. + * We just need to clean up, report the error, and go away. */ if (sigsetjmp(local_sigjmp_buf, 1) != 0) { @@ -753,7 +753,14 @@ StartBackgroundWorker(void) /* Prevent interrupts while cleaning up */ HOLD_INTERRUPTS(); - /* Report the error to the server log */ + /* + * sigsetjmp will have blocked all signals, but we may need to accept + * signals while communicating with our parallel leader. Once we've + * done HOLD_INTERRUPTS() it should be safe to unblock signals. + */ + BackgroundWorkerUnblockSignals(); + + /* Report the error to the parallel leader and the server log */ EmitErrorReport(); /* |