I would like to be able to detect when the server connection has gone away, and reconnect. Ideally, we would have an "auto-reconnect" option like that of the mysql library. At a minimum, ruby-pg should raise a unique Ruby exception that can be rescued. Currently, it appears to raise a generic PGError.
Issue #129 duplicate