brianc/node-postgres — pull request #468 by benighted (2013-11-15 17:05:48+00:00)
Title: Catch connection reset or terminated by administrator command

This prevents a fatal error when postgres is restarted or crashes during a query. The underlying error emits an 'error' event, but node would still crash when trying to end the connection. This way, you can handle the error in your app and exit gracefully.