ALTER SEQUENCE seq_name RESTART WITH 22;
SELECT setval('payments_id_seq', 21, true); # next value will be 22