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 @@ -359,7 +359,8 @@ dsm_impl_posix_resize(int fd, off_t size)
359
359
* allowed SIGUSR1 to interrupt us repeatedly (for example, due to recovery
360
360
* conflicts), the retry loop might never succeed.
361
361
*/
362
- PG_SETMASK (& BlockSig );
362
+ if (IsUnderPostmaster )
363
+ PG_SETMASK (& BlockSig );
363
364
364
365
/* Truncate (or extend) the file to the requested size. */
365
366
do
@@ -399,9 +400,12 @@ dsm_impl_posix_resize(int fd, off_t size)
399
400
}
400
401
#endif /* HAVE_POSIX_FALLOCATE && __linux__ */
401
402
402
- save_errno = errno ;
403
- PG_SETMASK (& UnBlockSig );
404
- errno = save_errno ;
403
+ if (IsUnderPostmaster )
404
+ {
405
+ save_errno = errno ;
406
+ PG_SETMASK (& UnBlockSig );
407
+ errno = save_errno ;
408
+ }
405
409
406
410
return rc ;
407
411
}
You can’t perform that action at this time.
0 commit comments