Postgres-X2 is an open source project to provide horizontal scalability including write-scalability, synchronous multi-master, and transparent PostgreSQL interface. It is a collection of tightly coupled database components which can be installed in more than one hardware or virtual machines.
This project used the name Postgres-XC originally, it is renamed to Postges-X2 from 2015 after it was moved to Github. In many of the documents and code, we still use Postgres-XC.
Please refer to the Charter for the project information
#License This project uses the same license as PostgreSQL, PostgreSQL license (like BSD).
#What is Postgres-X2
Subscribing grougle groups, issueing pull request and creating issues are the way to begin with. For more information please refer to our development page
Subscribe Postgres-X2-dev group(postgres-x2-dev@googlegroups.com) from google groups titled "postgres-x2-dev". You can post your issues and ideas here.
If you have codes for new feature or fix, you can issue pull request. This page contains Postgres-X2 development community information. Posgres-X2 repositories will be found at postgres-x2 developer page. You can also create issue to report bugs, to raise discussion, to post your ideas, etc.
[Report Issues] (https://github.com/postgres-x2/postgres-x2/issues)
For any project information please contact the project repensentive Koichi Suzuki or Galy Lee
you can download the stable release from here Postgres-XC 1.2.1
or you can download the stable development version, it is here REL1_2_STABLE
wget https://github.com/postgres-x2/postgres-x2/archive/REL1_2_STABLE.zip
install depedency packages
yum -y install gcc* libtool* libxml2-devel readline-devel flex bison crypto* perl-ExtUtils-Embed zlib-devel pam-devel libxslt-devel openldap-devel python-devel openssl-devel cmake
Unzip
unzip REL1_2_STABLE.zip
Configure
cd /home/galy/pgxc/stable (your source code place)
./configure --prefix=/home/galy/pgxc/stable
Please change the installation path to the location you want to install.
make
cd /home/galy/pgxc/stable (your source code place)
make install
Before you start to configure Postgres-XC cluster, you need to determine several things and make hardware/software ready.
Components
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. 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. 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.
The following is a quick example to setup one coordinator, two data nodes and one GTM
Init gtm, datanode, coordinator
>initgtm -Z gtm -D gtm
>initdb -D datanode1 --nodename dn1 #Initialize Datanode 1
>initdb -D datanode2 --nodename dn2 #Initialize Datanode 2
>initdb -D coord1 --nodename co1 # Initialize Coordinator 1
Change configuration
*Show and check gtm.conf and each postgresql.conf, change port values for Datanodes => 15432 for Dn1, 15433 for Dn2
Node start-up
>gtm -D gtm &
>postgres -X -D datanode1 -i & # -X for a Datanode
>postgres -X -D datanode2 -i & # -X for a Datanode
>postgres -C -D coord1 -i & # -C for a Coordinator
connect to coordinator
>psql postgres
launch that to set up cluster:
>CREATE NODE dn1 WITH (TYPE='datanode', PORT=15432);
>CREATE NODE dn2 WITH (TYPE='datanode', PORT=15433);
>select * from pgxc_node;
>select pgxc_pool_reload();
Then you can connect to Coordinator 1 and test your newly-made cluster
Please refer to roadmap in our wiki page.
Postgres-X2 online reference is here
Pgxc_ctl primer gives overall description of postgres-x2 architecture, cluster design, configuration and operation using pgxc_ctl utility.
This is the presentation slide deck of postgres-x2 configuration and operation demo at PG-Open, 2013
There are a lot of talks materials here
The architecture design and implementation detail is in this [document] (http://postgres-x2.github.io/presentation_docs/2014-07-PGXC-Implementation/pgxc.pdf)
The offical document has an internal of Postgres-X2 [section] (http://postgres-x2.github.io/reference/1.2/html/xc-overview.html)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。