Postgresql – Persistent problems importing CSV files via pgAdmin 4 to PostgreSQL 12 on Mac OS – Failing with Exit Code -6

csverrorsimportpgadmin-4postgresql

I've been trying for several days to import CSV files into a PostgreSQL 12 database hosted on Mac OS 10.15.5, using the Import/Export tool in pgAdmin 4. I am consistently getting an error message reading: "Failed (exit code: -6)" and despite extensive internet searching have not been able to determine what that exit code means or why the process is failing.

Here is a screenshot of the error:

enter image description here

Troubleshooting steps I've tried so far:

  • Moving the CSV files into directories that should be accessible to the postgres server to rule out permissions problems.
  • Adjusting the data types of the columns in my empty table to rule out a data-type mismatch.
  • Creating new CSV files with very simple test entries and a new table with matching columns.
  • Restarting the machine and relaunching PostgreSQL 12 and pgAdmin4.
  • Lots of other suggestions and steps recommended on this site and other related forums.

Anyone run into this problem before or have some insights into what might be happening? Any help you can offer would be greatly appreciated. Happy to add other details and provide more information as needed.

Thanks in advance for your time and assistance.

Best Answer