mirror of https://github.com/citusdata/citus.git
Fix comments and error handling
parent
b14c5a0308
commit
995cb0619a
|
@ -361,14 +361,21 @@ CitusMaintenanceDaemonMain(Datum main_arg)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* When the database crashes, background workers are restarted, but
|
* When the database crashes, background workers are restarted, but
|
||||||
* the state in shared memory is lost. In that case, we exit and
|
* the state in shared memory is lost. In that case, we exit and wait
|
||||||
* wait for a session to call InitializeMaintenanceDaemonBackend
|
* for Postmaster calling __PG_Init which in turn calls
|
||||||
* to properly add it to the hash.
|
* InitializeMaintenanceDaemonForAdminDB.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
proc_exit(0);
|
proc_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (found && myDbData->workerPid != 0)
|
||||||
|
{
|
||||||
|
/* Another maintenance daemon is running.*/
|
||||||
|
|
||||||
|
proc_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
{
|
||||||
/* ensure the values in MaintenanceDaemonDBData are zero */
|
/* ensure the values in MaintenanceDaemonDBData are zero */
|
||||||
|
|
Loading…
Reference in New Issue