next_id is managed with a table instead of a global variable
read polls with timestamp descending
updating identifiant in one time