We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4a617e commit a715c20Copy full SHA for a715c20
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
/* Truncate (or extend) the file to the requested size. */
369
do
@@ -402,9 +403,12 @@ dsm_impl_posix_resize(int fd, off_t size)
402
403
}
404
#endif /* HAVE_POSIX_FALLOCATE && __linux__ */
405
- save_errno = errno;
406
- PG_SETMASK(&UnBlockSig);
407
- errno = save_errno;
+ {
408
+ save_errno = errno;
409
+ PG_SETMASK(&UnBlockSig);
410
+ errno = save_errno;
411
+ }
412
413
return rc;
414
0 commit comments