gtm_ctl

Name

gtm_ctl --  Postgres-XC GTM operation module

Synopsis

gtm_proxy [option...]

Description

Note: The following description applies only to Postgres-XC

gtm_ctl starts/stops gtm or gtm_proxy. The options specify the GTM configuration.

Options

Options are specified with preceding '-', each option may be associated with a value.

Options are as follows:

D

Specify a directory which holds data for gtm or gtm_proxy

l

Specify a log file for gtm_ctl.

m

Set mode. Value can be smart, fast or immediate.

o

Option method. This parameter will be passed down to gtm or gtm_proxy.

p

Set up postgres bin repository.

S

Specify which to start, gtm or gtm_proxy. The value can be specified as gtm or gtm_proxy.

t

Specify the wait time in seconds.

W or w

Wait option.

gtm_ctl issues the following keywords to select operations on gtm and gtm_proxy.

start

Start a GTM/GTM proxy instance.

restart

Restart a GTM/GTM proxy instance.

stop

Stop a GTM/GTM proxy instance.

status

Look at the status of GTM instance. If active, 1 is printed. If standby, 0 is printed.

promote

Promote a GTM instance as active.

reconnect

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