Re: BUG #5451: pg_restore doesn't close input .tar archive

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5451: pg_restore doesn't close input .tar archive
Дата
Msg-id 11966.1273241525@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #5451: pg_restore doesn't close input .tar archive  (Pavel Golub <pavel@microolap.com>)
Ответы Re: BUG #5451: pg_restore doesn't close input .tar archive  (Pavel Golub <pavel@microolap.com>)
Список pgsql-bugs
Pavel Golub <pavel@microolap.com> writes:
> TL> I'm not sure what distinction you're trying to draw.  Do you want us to
> TL> add a close() just before exit()?  If so, what for?

> First of all, for uniformity I guess. :) .backup files are closed
> properly.

> And secondly, I'm using these sources in my project and I
> need input file to be closed. Of course, I can find the place
> where to insert close() by myself, but I beleive that this must be done in the
> official release.

I don't think so.  The pg_restore code is not written to be a library.
(Some have proposed making it into one, but there's a lot of work needed
to make that happen.)  Even if it were designed as a library, I don't
think it would be the library's job to close the input file --- what
if the surrounding app passes it stdin, for instance?

            regards, tom lane

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

Предыдущее
От: goutham jalakam
Дата:
Сообщение: Re: BUG #5450: system lacked sufficient buffer space, or because a queue was full, could not perform the operation
Следующее
От: "KOIZUMI Satoru"
Дата:
Сообщение: BUG #5455: two PGTYPES_NUM_OVERFLOWs