How can I get PostgreSQL to not advance sequences when COPY fails?
The sequences are designed like that, the are not supposed to produce contiguous numbers. 

However, you can reset them before (re)trying the COPY with 

SELECT setval('sequence_name', (SELECT max(id) FROM your_table));