Re: Function written in C, hangs on one machine and not another...

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Function written in C, hangs on one machine and not another...
Дата
Msg-id 20051028143844.GD26190@svana.org
обсуждение исходный текст
Ответ на Re: Function written in C, hangs on one machine and not another...  (CG <cgg007@yahoo.com>)
Ответы Re: Function written in C, hangs on one machine and not another...  (CG <cgg007@yahoo.com>)
Список pgsql-general
On Fri, Oct 28, 2005 at 07:24:12AM -0700, CG wrote:
> So it might be a kernel thing. What is different when the function is called
> from within PostgreSQL that is different that the function being called in a
> standalone program?

Not entirely sure, but I'm sure the size of the write matters. For
example, if your test rpogram, did you check that the write actually
wrote everything?

> Insanity? I agree completely. The major issue is that the FDF Toolkit has only
> one function for reading in FDF Data:

<snip>

Firstly, instead of using stdin, you can pass /dev/fd/<file descriptor>
as the filename (on Linux). This avoids stuffing with stdin.

That doesn't solve the blocking problem. To do that you really need
multiple threads of execution, so either fork or threads, neither of
which are really supported.

ISTM the best idea: write the data to disk then read it back. Why be
difficult when you can do it easily...

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: "w_tom"
Дата:
Сообщение: Re: Why database is corrupted after re-booting
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: serial number in output