Trigger db_prepare_master and db_prepare_slave events
Correctly remove master/slave session data