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
pgstat_report_wait_start (WAIT_EVENT_DSM_ALLOCATE );
368
369
#if defined(HAVE_POSIX_FALLOCATE ) && defined(__linux__ )
@@ -398,9 +399,12 @@ dsm_impl_posix_resize(int fd, off_t size)
398
399
#endif
399
400
pgstat_report_wait_end ();
400
401
401
- save_errno = errno ;
402
- PG_SETMASK (& UnBlockSig );
403
- errno = save_errno ;
402
+ if (IsUnderPostmaster )
403
+ {
404
+ save_errno = errno ;
405
+ PG_SETMASK (& UnBlockSig );
406
+ errno = save_errno ;
407
+ }
404
408
405
409
return rc ;
406
410
}
You can’t perform that action at this time.
0 commit comments