MCPcopy Create free account
hub / github.com/apache/cloudberry / ExitPostmaster

Function ExitPostmaster

src/backend/postmaster/postmaster.c:5705–5733  ·  view source on GitHub ↗

* ExitPostmaster -- cleanup * * Do NOT call exit() directly --- always go through here! */

Source from the content-addressed store, hash-verified

5703 * Do NOT call exit() directly --- always go through here!
5704 */
5705static void
5706ExitPostmaster(int status)
5707{
5708#ifdef HAVE_PTHREAD_IS_THREADED_NP
5709
5710 /*
5711 * There is no known cause for a postmaster to become multithreaded after
5712 * startup. Recheck to account for the possibility of unknown causes.
5713 * This message uses LOG level, because an unclean shutdown at this point
5714 * would usually not look much different from a clean shutdown.
5715 */
5716 if (pthread_is_threaded_np() != 0)
5717 ereport(LOG,
5718 (errcode(ERRCODE_INTERNAL_ERROR),
5719 errmsg_internal("postmaster became multithreaded"),
5720 errdetail("Please report this to <%s>.", PACKAGE_BUGREPORT)));
5721#endif
5722
5723 /* should cleanup shared memory and kill all backends */
5724
5725 /*
5726 * Not sure of the semantics here. When the Postmaster dies, should the
5727 * backends all be killed? probably not.
5728 *
5729 * MUST -- vadim 05-10-1999
5730 */
5731
5732 proc_exit(status);
5733}
5734
5735/*
5736 * sigusr1_handler - handle signal conditions from child processes

Callers 6

PostmasterMainFunction · 0.85
checkControlFileFunction · 0.85
ConnCreateFunction · 0.85
reaperFunction · 0.85
PostmasterStateMachineFunction · 0.85
StartChildProcessFunction · 0.85

Calls 4

proc_exitFunction · 0.85
errcodeFunction · 0.50
errmsg_internalFunction · 0.50
errdetailFunction · 0.50

Tested by

no test coverage detected