* background process goes away immediately in an emergency.
*/
rc = WaitLatchOrSocket(&MyProc->procLatch,
- WL_SOCKET_READABLE | WL_LATCH_SET | WL_TIMEOUT | WL_POSTMASTER_DEATH,
+ WL_SOCKET_READABLE | WL_LATCH_SET |
+ WL_TIMEOUT | WL_POSTMASTER_DEATH,
fd, 1000L);
ResetLatch(&MyProc->procLatch);
tpath)));
}
+ CloseTransientFile(fd);
+
/* rename into place */
if (rename(tpath, path) != 0)
ereport(ERROR,
if (serial.version != bdr_count_version)
{
- elog(NOTICE, "version of stat file changed, zeroing");
+ elog(WARNING, "version of stat file changed, zeroing");
goto zero_file;
}
if (serial.nr_slots > bdr_count_nnodes)
{
- elog(NOTICE, "stat file has more stats than we need, zeroing");
+ elog(WARNING, "stat file has more stats than we need, zeroing");
goto zero_file;
}
CloseTransientFile(fd);
LWLockRelease(BdrCountCtl->lock);
return;
+
zero_file:
CloseTransientFile(fd);
LWLockRelease(BdrCountCtl->lock);