Menu

Pgxc_ctl_tutorial

Koichi Suzuki

This page is now under the construction.

pgxc_ctl overview

Preparing pgxc_ctl

This section describes how to build and install pgxc>ctl.

First, you need to configure the build options as follows:

cd $PGCXSRC
./configure (your configuration options)

If you've done this to build Postgres-XC binaries, you don't have to do it again.

Then, build and install pgxc_ctl as follows:

cd $PGXCSRC
make
make install

Simple enough!

Configuring Postgres-XC step-by-step

Before you start

Before you start to configure Postgres-XC cluster, you need to determine several things and make hardware/software ready.

Postgres-XC component

Postgres-XC database cluster consists of the following components.

  • gtm
    gtm stands for "global transaction manager", which provides core of transaction management feature needed to run all the Postgres-XC component in a integrated way. Coordinators and datanodes connect to GTM to run transactions consisitently at different servers.
  • gtm_proxy
    This is a proxy of a connection form coordinators/datanodes to GTM to reduce the amount of interaction and data.
  • coordinator
    This is a connection point to Postgres-XC applications. A coordinator accepts SQL statements from applications, analyze and determines where the data is stored and handles SQL statements to each datanode. You can configure as many coordinators in Postgres-XC.
  • datanode
    This node stores user data Datanode reads its local SQL statements from coordinators and handle them.

How many servers you need?

If you are just testing Postgres-XC, you need only one server. This can even be a virtual machine. You can run sufficient component on this machine but it's not a good idea to run slave of each components. If you're in this stage, please read this page carefully. Pgxc_ctl will provide configuration file template but it is not suitable for this purpose. You may have to rewrite many of the template to fit to your single-server configuration.

If you are deploying Postgres-XC for more serious use, you should consider how many servers you need to store your data. [[Scalability|The scalability data of XC] will help to determine this. Additionally, you may want to run GTM at a separate server mainly for availability purpose and you may want another server to run GTM slave for hight availability.

It is highly advised to install gtm_proxy, coordinator and datanode at the rest of the servers. This simplifies the configuration and maintains worload of each servers nearly even.

Postgres-XC owner and administrator

Considering HA with slaves

Resources

  • Directory
  • Port

Configuring


Related

Postgres-XC: Getting_Started
Postgres-XC: Main_Page