On 12/29/14, 6:43 PM, Greg Sabino Mullane wrote:
> I am working on enhancing the ping() method of DBD::Pg. The goal of that
> is for a user to be able to determine if the connection to the database
> is still valid.
This is actually a VERY common thing for monitoring frameworks to do. Currently, the general method seems to be
somethingakin to
psql -c 'SELECT 1' ...
perhaps instead of going through all the effort that you currently are we could add a FEBE ping command, and expose
thatthrough a special psql option (or maybe a special pg_ping command).
This won't be noticeably faster than SELECT 1, but it would prevent a bunch of pointless work on the backend side, and
shouldgreatly simplify DBD's ping(). Only thing I'm not sure of is if this could be made to be safe within a COPY...
:(
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com