change postgres state