- GTM standby connects to GTM and send new command "BEGIN BACKUP" or something like this. When GTM receives this command, GTM first lock all the other thread at their static points, typically just before they read request from clients.
- GTM thread connected to GTM standby then establish connections to GTM-Standby, link this connection to thread information of each thread. Then release locks so that other threads can continue to work with new backup connection to GTM standby.
- Main thread does not have any connection to the standby.
Needed extension:
- New entry in GTM thread information to indicate if the thread is main or not.
- New command to indicate to "BEGIN BACKUP", and then "END BACKUP". When "BEGIN BACKUP" is received, GTM will lock all the other threads. When "END BACKUP" is received, new communication to GTM-Standby will be established for each worker thread (not for main thread), then all the thread locks will be released.
- To lock each thread, thr_lock can be used. This is defined and initialized but not used so far.