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