Hi all,

I'm facing with a strange error message during a failed pg_restore:

pg_restore: processing data for table "historicopesquisaitem"
pg_restore: [directory archiver] could not close data file: Success

I got this error trying to restore from a directory dump file.

Looking at the pg_restore code seems that "gzclose" didn't set the 'errno'
because I got a Z_BUF_ERROR [1] from "cfclose" return and the "errno" still
0 (zero).

412     if (cfclose(cfp) !=0)
413         exit_horribly(modulename, "could not close data file: %s\n",
414                       strerror(errno));

Should we set the errno using the gzclose return code or just add some
check to "strerror" the "errno" or the "gzclose return code" if they are
different?

Thoughts?


[1] http://www.zlib.net/manual.html

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

Reply via email to