class PG::Connection
def reset
Resets the backend connection. This method closes the
conn.reset()
call-seq:
def reset # Use connection options from PG::Connection.new to reconnect with the same options but with renewed DNS resolution. # Use conninfo_hash as a fallback when connect_start was used to create the connection object. iopts = @iopts_for_reset || conninfo_hash.compact if iopts[:host] && !iopts[:host].empty? && PG.library_version >= 100000 iopts = self.class.send(:resolve_hosts, iopts) end conninfo = self.class.parse_connect_args( iopts ); reset_start2(conninfo) async_connect_or_reset(:reset_poll) self end