Re: Function written in C, hangs on one machine and not another... - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Function written in C, hangs on one machine and not another...
Date
Msg-id 20051028143844.GD26190@svana.org
Whole thread Raw
In response to Re: Function written in C, hangs on one machine and not another...  (CG <cgg007@yahoo.com>)
Responses Re: Function written in C, hangs on one machine and not another...  (CG <cgg007@yahoo.com>)
List 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.

Attachment

pgsql-general by date:

Previous
From: "w_tom"
Date:
Subject: Re: Why database is corrupted after re-booting
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: serial number in output