I wouldn't use autocommit - if theres an error you'll end up with an incomplete transaction committed to the database.   I'd add a tposgresqlcommit after processing a file successfully.