Database redundancy

In my res_odbc I have setup several DSN, in the func_odbc, for every query I have 2 or more dsn in the datasource. When the database (first in the order) goes down, is there a way to have asterisk mark that as “down” and not try it anymore (like in opensips?) until the next “test” cycle comes, which at that time, if db is alive, it will mark as up again?

the reason is that when the “primary” db goes down, the PDD (post dial delay) becomes significant higher because I have many query I go through (e.g. like 5 to 6) and if each query takes 1 second to test to see if primary db is up or not, it will put additional 5 to 6 seconds to PDD.

I am running Asterisk 11