diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 6d098874d9..0c6a4271a6 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -2864,17 +2864,17 @@ CleanupBackgroundWorker(int pid, HandleChildCrash(pid, exitstatus, namebuf); return true; } - } - if (!ReleasePostmasterChildSlot(rw->rw_child_slot)) - { - /* - * Uh-oh, the child failed to clean itself up. Treat as a crash - * after all. - */ - rw->rw_crashed_at = GetCurrentTimestamp(); - HandleChildCrash(pid, exitstatus, namebuf); - return true; + if (!ReleasePostmasterChildSlot(rw->rw_child_slot)) + { + /* + * Uh-oh, the child failed to clean itself up. Treat as a + * crash after all. + */ + rw->rw_crashed_at = GetCurrentTimestamp(); + HandleChildCrash(pid, exitstatus, namebuf); + return true; + } } /* Get it out of the BackendList and clear out remaining data */