Uploading a csv and losing a connection results in lost disk space and table bloat
The tuples were created and they left dead because the transaction wasn't committed. Simply run


VACUUM and the dead tuples will be purged. Or run
VACUUM FULL and the table will be rewritten (removing the dead tuples). If you have more dead tuples then live ones this may be faster, but it'll require a lock. It's usually massively slower but it sounds like you may be an exception.