mirror of https://github.com/citusdata/citus.git
Merge pull request #1585 from citusdata/exit_maintenanced
Maintenance daemon dies peacefully when it gets lost finding itselfpull/1549/merge
commit
131baeda3d
|
@ -212,8 +212,13 @@ CitusMaintenanceDaemonMain(Datum main_arg)
|
|||
HASH_FIND, NULL);
|
||||
if (!myDbData)
|
||||
{
|
||||
/* should never happen */
|
||||
ereport(ERROR, (errmsg("got lost finding myself")));
|
||||
/*
|
||||
* When the database crashes, background workers are restarted, but
|
||||
* the state in shared memory is lost. In that case, we exit and
|
||||
* wait for a session to call InitializeMaintenanceDaemonBackend
|
||||
* to properly add it to the hash.
|
||||
*/
|
||||
proc_exit(0);
|
||||
}
|
||||
LWLockRelease(&MaintenanceDaemonControl->lock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue