Re: [PATCH] Add SIGCHLD catch to psql

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, David Fetter <david@fetter.org>, Bruce Momjian <bruce@momjian.us>, pgsql-hackers@postgresql.org
Date: 2010-05-17T16:15:10Z
Lists: pgsql-hackers

Attachments

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> If you're combining this with the FETCH_COUNT logic then it seems like
> it'd be sufficient to check ferror(fout) once per fetch chunk, and just
> fall out of that loop then.  I don't want psql issuing query cancels
> on its own authority, either.

Attached is a patch that just checks the result from the existing
fflush() inside the FETCH_COUNT loop and drops out of that loop if we
get an error from it.

	Thanks!

		Stephen