GTM(1)

NAME
gtm - provides global transaction management feature to Postgres-XC.

SYNOPSIS

gtm [option...]

DESCRIPTION

    Note

    The following description applies only to Postgres-XC

gtm provides consistent transaction manager fully compatible with vanilla PostgreSQL. It is highly advised to start and stop gtm using gtm_ctl(8).

You must provide gtm configuration file gtm.conf placed at gtm working directory as specified by -D command line option. The configuration file specifies gtm running environment and resources.

Some of the parameters specified in the control file can be overridden by command line options.

CONFIGURATION FILE

    Note

    The following description applies only to Postgres-XC

GTM configuration parameters are specified in the configuration file gtm.conf. placed in the working directory specified as -D option of gtm command line option as described in the next section.

Format of the configuration file is the same as postgresql.conf. Options are as follows.

active_host (string)
    Specifies listen addresses (host name or IP address) of active gtm. This parameter is effective only when this gtm is specified as a standby. There is no default value for this parameter.

active_port (integer)
    Specifies the port number of active gtm. This parameter is effective only when this gtm is specified as a standby. There is no default value for this parameter.

keepalives_count (integer)
    Specifies keepalives_count option for the connection to gtm. This option is effective only when it runs as GTM-Standby. Default value is zero and keepalives feature is disabled.

keepalives_idle (integer)
    Specifies keepalives_idle option for the connection to gtm. This option is effective only when it runs as GTM-Standby. Default value is zero and keepalives feature is disabled.

keepalives_interval (integer)
    Specifies keepalives_interval option for the connection to gtm. This option is effective only when it runs as GTM-Standby. Default value is zero and keepalives feature is disabled.

listen_addresses (string)
    Specifies listen addresses (host name or IP address) of this gtm or gtm standby. Default value is '*'.

log_file (string)
    Specifies log file name. This file will be created at the working directory of this gtm as specified by -D command line option. The default is gtm.log.

log_min_messages (enum)
    Controls which message levels are written to the log. Valid values are DEBUG, DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, INFO, NOTICE, WARNING, ERROR, LOG, FATAL and PANIC. Each level includes all the levels that follow it. The later the level, the fewer messages are sent. The default is WARNING.

nodename (string)
    Specifies the name of this gtm or gtm standby. There is no default value for this parameter.

port (integer)
    Specifies the port number of gtm or gtm standby. Default value is 6666.

startup (enum)
    Specifies the startup mode of this gtm. Valied values are act or standby. act means to start up this gtm as usual so that gtm clients (Coordinators, data nodes or gtm-proxies) can connect for transaction management. standby means this gtm starts up as a backup of act gtm. standbygtm can be promoted to act when act fails.

synchronous-backup (boolean)
    Specifies if backup to GTM-Standby is taken synchronously. If this is turned on, GTM will send and receive synchronize message to make sure that all the backups reached to the standby.

    If it is turned off, all the backup information will be sent without checking they reached to GTM-Standby.

    Default value is off.

OPTIONS

Options are specified with preceding '-', each option may be associated with a value. They can be specified in -o option of gtm_ctl(8).

Parameters specified as command line options override these specified in the configuration file described in the previous section.

Options are as follows:

D
    Specify a directory which holds data for gtm or gtm_proxy

l
    Specify a log file for gtm_ctl.

x
    Specify global transaction ID to start with. This is needed when you start gtm for the first time because initdb consumes XID locally and gtm should start to give GXID greater than the last one each initdb consumed locally. If gtm has been shut down gracefully, then this value will be taken from the last run.

    If -x option is not specified at the first run, initial global transaction ID value will be set to a default initial value which is considered to be safe enough (in version 1.1, it is 10000). If many statements are involved in initdb, you should consider to specify larger value.

    To find the precise value to start with, you should run pg_controldata to find Latest checkpoint's NextXID of all the Coordinators and Datanodes and choose the value larger than or equals to the maximum value found.

h
    Specify host name or IP address used.

p
    Specify port number to listen.

When starting GTM as a standby instance, following options can also be provided.

s
    Specify if GTM starts as a standby

i
    Specify host name or IP address of active GTM instance to connect to

q
    Specify port number of active GTM instance to connect to