Note: The following description applies only to Postgres-XC
gtm_ctl starts/stops gtm or gtm_proxy. The options specify the GTM configuration.
Options are specified with preceding '-', each option may be associated with a value.
Options are as follows:
Specify a directory which holds data for gtm or gtm_proxy
Specify a log file for gtm_ctl.
Set mode. Value can be smart, fast or immediate.
Option method. This parameter will be passed down to gtm or gtm_proxy.
Set up postgres bin repository.
Specify which to start, gtm or gtm_proxy. The value can be specified as gtm or gtm_proxy.
Specify the wait time in seconds.
Wait option.
gtm_ctl issues the following keywords to select operations on gtm and gtm_proxy.
Start a GTM/GTM proxy instance.
Restart a GTM/GTM proxy instance.
Stop a GTM/GTM proxy instance.
Look at the status of GTM instance. If active, 1 is printed. If standby, 0 is printed.
Promote a GTM instance as active.
Reconnect a GTM Proxy to another GTM instance.
Typically, you can issue the following command to start gtm/
gtm_ctl start -Z gtm -D datafolder
Or gtm_proxy:
gtm_ctl start -Z gtm_proxy -D datafolder_proxy
Promote a GTM as active:
gtm_ctl promote -Z gtm -D datafolder
Reconnect a GTM proxy to another GTM instance:
gtm_ctl reconnect -Z gtm_proxy -D datafolder_proxy -o '-s hostname -t port_number'
Look at the status of a GTM server:
gtm_ctl status -Z gtm -D datafolder