2.6. ltcluster configuration file

Create a ltcluster.conf file on the primary server. The file must contain at least the following parameters:

    node_id=1
    node_name='node1'
    conninfo='host=node1 user=ltcluster dbname=ltcluster connect_timeout=2'
    data_directory='/var/lib/lightdb/data'
  

ltcluster.conf should not be stored inside the LightDB data directory, as it could be overwritten when setting up or reinitialising the LightDB server. See sections Configuration and configuration file for further details about ltcluster.conf.

Note

ltcluster only uses pg_bindir when it executes LightDB binaries directly.

For user-defined scripts such as promote_command and the various service_*_commands, you must always explicitly provide the full path to the binary or script being executed, even if it is ltcluster itself.

This is because these options can contain user-defined scripts in arbitrary locations, so prepending pg_bindir may break them.

Tip

For Debian-based distributions we recommend explictly setting pg_bindir to the directory where lt_ctl and other binaries not in the standard path are located.

Tip

If your distribution places the ltcluster binaries in a location other than the LightDB installation directory, specify this with ltcluster_bindir to enable ltcluster to perform operations (e.g. ltcluster cluster crosscheck) on other nodes.

See the file ltcluster.conf.sample for details of all available configuration parameters.