I encountered the same error "could not stat file XXX" as the post below when trying to copy some large files to postgresql. According to the answer it is a bug in v11 postgresql. I am using v12 but still has this problem. Just wondering if the problem exists in v13. v14 is still in beta form and cannot be used.
ERROR: could not stat file "XX.csv": Unknown error
One answer suggested that:
- Use the existing PostgreSQL 11 database
- Install psql or pgadmin from the PostgreSQL 10 installation and use it to upload the file (with the command shown in the question)
Does this suggest to install PostgreSQL 10 without uninstalling PostgreSQL 11?