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 @@ -352,7 +352,8 @@ dsm_impl_posix_resize(int fd, off_t size)
352
352
* allowed SIGUSR1 to interrupt us repeatedly (for example, due to recovery
353
353
* conflicts), the retry loop might never succeed.
354
354
*/
355
- PG_SETMASK (& BlockSig );
355
+ if (IsUnderPostmaster )
356
+ PG_SETMASK (& BlockSig );
356
357
357
358
/* Truncate (or extend) the file to the requested size. */
358
359
do
@@ -390,9 +391,12 @@ dsm_impl_posix_resize(int fd, off_t size)
390
391
}
391
392
#endif /* HAVE_POSIX_FALLOCATE && __linux__ */
392
393
393
- save_errno = errno ;
394
- PG_SETMASK (& UnBlockSig );
395
- errno = save_errno ;
394
+ if (IsUnderPostmaster )
395
+ {
396
+ save_errno = errno ;
397
+ PG_SETMASK (& UnBlockSig );
398
+ errno = save_errno ;
399
+ }
396
400
397
401
return rc ;
398
402
}
You can’t perform that action at this time.
0 commit comments