src/postgres/backend/postmaster/peloton.cpp
/* ----------
 * peloton_bootstrap -
 *
 *  Handle bootstrap requests in Peloton.
 * ----------
 */
peloton_bootstrap
Handle bootstrap requests in Peloton.
peloton_bootstrap Handle bootstrap requests in Peloton .
void
peloton_bootstrap() {
  try {
    peloton::bridge::Bootstrap::BootstrapPeloton();
    if(logging_module_check == false){
      elog(DEBUG2, "....................................................................................................");
      elog(DEBUG2, "Logging Mode : %d", peloton_logging_mode);
      logging_module_check = true;
      if(peloton_logging_mode != LOGGING_TYPE_INVALID) {
        auto& log_manager = peloton::logging::LogManager::GetInstance();
        if (!log_manager.IsInLoggingMode()) {
          log_manager.SetSyncCommit(true);
          elog(DEBUG2, "Wait for standby mode");
          std::thread(&peloton::logging::LogManager::StartStandbyMode,
                      &log_manager).detach();
          log_manager.WaitForModeTransition(peloton::LOGGING_STATUS_TYPE_STANDBY, true);
          elog(DEBUG2, "Standby mode");
          log_manager.StartRecoveryMode();
          elog(DEBUG2, "Wait for logging mode");
          log_manager.WaitForModeTransition(peloton::LOGGING_STATUS_TYPE_LOGGING, true);
          elog(DEBUG2, "Logging mode");
        }
      }
    }
    peloton::gc::GCManagerFactory::Configure(peloton_gc_mode);
    peloton::gc::GCManagerFactory::GetInstance().StartGC();
  }
  catch(const std::exception &exception) {
    elog(ERROR, "Peloton exception :: %s", exception.what());
  }
}
void peloton_bootstrap ( ) { try { peloton :: bridge :: Bootstrap :: BootstrapPeloton ( ) ; if ( logging_module_check == false ) { elog ( DEBUG2 , " " ) ; elog ( DEBUG2 , " " , peloton_logging_mode ) ; logging_module_check = true ; if ( peloton_logging_mode != LOGGING_TYPE_INVALID ) { auto & log_manager = peloton :: logging :: LogManager :: GetInstance ( ) ; if ( ! log_manager . IsInLoggingMode ( ) ) { log_manager . SetSyncCommit ( true ) ; elog ( DEBUG2 , " " ) ; std :: thread ( & peloton :: logging :: LogManager :: StartStandbyMode , & log_manager ) . detach ( ) ; log_manager . WaitForModeTransition ( peloton :: LOGGING_STATUS_TYPE_STANDBY , true ) ; elog ( DEBUG2 , " " ) ; log_manager . StartRecoveryMode ( ) ; elog ( DEBUG2 , " " ) ; log_manager . WaitForModeTransition ( peloton :: LOGGING_STATUS_TYPE_LOGGING , true ) ; elog ( DEBUG2 , " " ) ; } } } peloton :: gc :: GCManagerFactory :: Configure ( peloton_gc_mode ) ; peloton :: gc :: GCManagerFactory :: GetInstance ( ) . StartGC ( ) ; } catch ( const std :: exception & exception ) { elog ( ERROR , " " , exception . what ( ) ) ; } }
peloton_bootstrap
  Handle bootstrap requests in Peloton.
peloton_bootstrap Handle bootstrap requests in Peloton .
// Process the utility statement // Sart logging // Finished checking logging module // Launching a thread for logging // Set default logging mode // Wait for standby mode // Do any recovery // Wait for logging mode // start GC as per configuration