Andreas Muck <[EMAIL PROTECTED]> writes:
> We have an application running on Linux (SuSE 7.2, kernel 2.4.16) that 
> opens lots of connections to a Postgres database and occasionaly dies 
> with segfault.

> The program seems to crash when it returns from pqWaitTimed(). As 
> pqWaitTimed uses select() to poll the file descriptors, I suppose the 
> crash is related to the limit of 1024 file descriptors that fd_set can hold.

If that's the size of fd_set on your machine, then yes, this doesn't
surprise me at all.  The code that calls select() is no doubt clobbering
some bit beyond the end of the fd_set array.

7.4 is designed to use poll() in preference to select() (if available),
because of previous complaints about exactly this problem.  Not sure if
you want to update to 7.4 beta, but you could consider lifting the
pqWait code out of 7.4.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to