Search code examples
databasepostgresqlzlibdumppg-restore

pg_restore: [compress_io] could not uncompress data: invalid code lengths set


I've had problems to execute pg_restorecommand in Mac. It's returning this error:

pg_restore: [compress_io] could not uncompress data: invalid code lengths set

I'm using postgres 9.6.2.


Solution

  • That error message comes from the zlib library used by PostgreSQL for compression.

    I'd say that the file probably got corrupted (ASCII file transfer?).