I've noticed that whenever lines like these appear in /var/log/messages, nsd dies immediately after the pq_recvbuf messages finish arriving:
logger: DEBUG: pq_recvbuf: unexpected EOF on client connec\
tion
last message repeated 12 times
the number of messages varies and may or may not be the number of backends connected to nsd at the time.
I went through my logs after noticing this and it's happened dozens of times. I switched to nspostgres 3.5 after being on 2.01, but it is still happening. (Postgresql 7.2.3-RH and nsd 3.5.1 if it matters.)
I've run with Verbose and there seems to be no pattern as to any particular query causing problems. I ran several manually and had no problems. postmaster and backends appear to be fine.
I've seen no decrease in frequency after doubling the TCL stack size to 256k. /proc says I've never gotten close to my filehandle max (16k) so that shouldn't be a problem. No core is dumped, which is a shame.
It looks like Jon Griffin had the same problem a few months ago but nothing was really resolved.