File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -362,7 +362,8 @@ dsm_impl_posix_resize(int fd, off_t size)
362
362
* allowed SIGUSR1 to interrupt us repeatedly (for example, due to recovery
363
363
* conflicts), the retry loop might never succeed.
364
364
*/
365
- PG_SETMASK (& BlockSig );
365
+ if (IsUnderPostmaster )
366
+ PG_SETMASK (& BlockSig );
366
367
367
368
/* Truncate (or extend) the file to the requested size. */
368
369
do
@@ -402,9 +403,12 @@ dsm_impl_posix_resize(int fd, off_t size)
402
403
}
403
404
#endif /* HAVE_POSIX_FALLOCATE && __linux__ */
404
405
405
- save_errno = errno ;
406
- PG_SETMASK (& UnBlockSig );
407
- errno = save_errno ;
406
+ if (IsUnderPostmaster )
407
+ {
408
+ save_errno = errno ;
409
+ PG_SETMASK (& UnBlockSig );
410
+ errno = save_errno ;
411
+ }
408
412
409
413
return rc ;
410
414
}
You can’t perform that action at this time.
0 commit comments