To reset the auto increment you have to get your sequence name by using following query.
Syntax:
SELECT pg_get_serial_sequence(‘tablename’, ‘ columnname‘);
Example:
SELECT pg_get_serial_sequence('demo', 'autoid');
The query will return the sequence name of autoid as "Demo_autoid_seq" Then use the following query to reset the autoid
Syntax:
ALTER SEQUENCE sequenceName RESTART WITH value;
Example:
ALTER SEQUENCE "Demo_autoid_seq" RESTART WITH 1453;