diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/postmaster.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 5f615d0f605..5488289a489 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -1338,6 +1338,8 @@ PostmasterMain(int argc, char *argv[]) * calls fork() without an immediate exec(), both of which have undefined * behavior in a multithreaded program. A multithreaded postmaster is the * normal case on Windows, which offers neither fork() nor sigprocmask(). + * Currently, macOS is the only platform having pthread_is_threaded_np(), + * so we need not worry whether this HINT is appropriate elsewhere. */ if (pthread_is_threaded_np() != 0) ereport(FATAL, @@ -3535,15 +3537,16 @@ ExitPostmaster(int status) /* * There is no known cause for a postmaster to become multithreaded after - * startup. Recheck to account for the possibility of unknown causes. + * startup. However, we might reach here via an error exit before + * reaching the test in PostmasterMain, so provide the same hint as there. * This message uses LOG level, because an unclean shutdown at this point * would usually not look much different from a clean shutdown. */ if (pthread_is_threaded_np() != 0) ereport(LOG, - (errcode(ERRCODE_INTERNAL_ERROR), - errmsg_internal("postmaster became multithreaded"), - errdetail("Please report this to <%s>.", PACKAGE_BUGREPORT))); + (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("postmaster became multithreaded"), + errhint("Set the LC_ALL environment variable to a valid locale."))); #endif /* should cleanup shared memory and kill all backends */ |