gzclose don't set properly the errno in pg_restore

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема gzclose don't set properly the errno in pg_restore
Дата
Msg-id CAFcNs+os5ExGvXMBrBBzzuJJamoHt5-zdJdxX39nkVG0KUxwsw@mail.gmail.com
обсуждение исходный текст
Ответы Re: gzclose don't set properly the errno in pg_restore  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
<div dir="ltr">Hi all,<br /><br />I'm facing with a strange error message during a failed pg_restore:<br /><br
/>pg_restore:processing data for table "historicopesquisaitem"<br />pg_restore: [directory archiver] could not close
datafile: Success<br /><br />I got this error trying to restore from a directory dump file.<br /><br />Looking at the
pg_restorecode 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).<br /><br />412     if (cfclose(cfp) !=0)<br />413         exit_horribly(modulename, "could
notclose data file: %s\n",<br />414                       strerror(errno));<br /><br />Should we set the errno using
thegzclose return code or just add some check to "strerror" the "errno" or the "gzclose return code" if they are
different?<br/><br />Thoughts?<br /><br /><br />[1] <a
href="http://www.zlib.net/manual.html">http://www.zlib.net/manual.html</a><br/><br />--<br />Fabrízio de Royes Mello<br
/>Consultoria/CoachingPostgreSQL<br />>> Timbira: <a
href="http://www.timbira.com.br">http://www.timbira.com.br</a><br/>>> Blog: <a
href="http://fabriziomello.github.io">http://fabriziomello.github.io</a><br/>>> Linkedin: <a
href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/>>> Twitter: <a
href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a><br/>>> Github: <a
href="http://github.com/fabriziomello">http://github.com/fabriziomello</a></div>

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Proposal: "Causal reads" mode for load balancing reads without stale data
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Badly designed error reporting code in controldata_utils.c