We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c0eb3c commit 80845b7Copy full SHA for 80845b7
src/backend/storage/ipc/dsm_impl.c
@@ -362,7 +362,8 @@ dsm_impl_posix_resize(int fd, off_t size)
362
* allowed SIGUSR1 to interrupt us repeatedly (for example, due to recovery
363
* conflicts), the retry loop might never succeed.
364
*/
365
- PG_SETMASK(&BlockSig);
+ if (IsUnderPostmaster)
366
+ PG_SETMASK(&BlockSig);
367
368
pgstat_report_wait_start(WAIT_EVENT_DSM_ALLOCATE);
369
#if defined(HAVE_POSIX_FALLOCATE) && defined(__linux__)
@@ -398,9 +399,12 @@ dsm_impl_posix_resize(int fd, off_t size)
398
399
#endif
400
pgstat_report_wait_end();
401
- save_errno = errno;
402
- PG_SETMASK(&UnBlockSig);
403
- errno = save_errno;
+ {
404
+ save_errno = errno;
405
+ PG_SETMASK(&UnBlockSig);
406
+ errno = save_errno;
407
+ }
408
409
return rc;
410
}
0 commit comments