need_to_restart in ruby way
change postgresql first start detection