How to configure Postgres-XCEdit
This page describes how to configure Postgres-XC in two scenes.
- Your laptop Laptop configuration
Explains how to configure XC in your laptop computer. This is not a realistic setup, but is sufficient to run XC for your own testing and experience. What you need is any laptop/desktop computer running a 64bit Linux operating system. A 32bit Linux environment may also work. If you don't have a native Linux machine, you can run a virtual machine, Virtualbox for example. About 2GB of memory is recommended for a real/virtual machine.
- Real server Real Server configuration
How to configure XC with three servers. This is a decent setup for production purposes. You can run performance benchmarks and real applications with this configuration. You will find it very straightforward to add more servers to a Postgres-XC cluster.
Postgres-XC is very flexible and you will find there are many other configurations you can use. This page only gives simple examples. In professional environments, you will be able to run dozens of Postgres-XC instances.
Before getting startedEdit
You should be familiar with Postgres-XC components, to be configured in each environment above.
- Coordinator: This is where your application connect to. Coordinator interacts with applications by receiving SQL statements and returning their results. Real data is not stored in the coordinator. It is stored in the datanode.
- Datanode: This is where real datanode is stored. Coordinator determines what datanode has the target data of each SQL statement and interacts to the datanode to get the result.
- GTM: This stands for Global Transaction Manger. GTM provides internal transaction information to coordinators and datanodes so that they work as single database as a whole.
- GTM proxy: This groups up interaction between GTM and other components to improve total performance. Laptop configuration does not need this component (obviously you can configure it if you want).