No, it's not pgStatPipe[1], it's select(2)'s first argument; max fd in the sets plus one. Probably your code works because pgStatPipe[1] == pgStatPipe[0] + 1.
Ah, I see now, thanks.
Regards, Andreas
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html