基本原理,對(duì) PostgreSQL-XC 體系結(jié)構(gòu)和組件有了初步認(rèn)識(shí),今天計(jì)劃在虛擬機(jī)上安裝 PostgreSQL-XC, 以做進(jìn)一步學(xué)習(xí)分析,下面是 PostgreSQL-XC 安裝的整個(gè)過程。
一 安裝準(zhǔn)備--1.1 requiremetns硬件需求:官方建議使用 64 位的系統(tǒng),內(nèi)存至少 4GB系統(tǒng)需求:64bit CentOS 5.4 或者其它其它 linux 系統(tǒng)軟件需求:GNU make version: 3.80 or newer Flex: 2.5.31 or later Perl: 5.8 or later GCC: Recent versions of GCC are recommendable 軟件需求,具體可參考 http://postgres-xc.sourceforge.net/docs/1_0/install-requirements.html
--1.2 實(shí)際安裝環(huán)境兩臺(tái)筆記本虛擬機(jī) RHEL 6.2 ,內(nèi)存 512 Mip 192.168.1.35 ;192.168.1.36
--1.3 安裝規(guī)劃
一個(gè)GTM節(jié)點(diǎn),兩個(gè)協(xié)調(diào)(Coordinator)節(jié)點(diǎn),二個(gè)數(shù)據(jù)節(jié)點(diǎn);這是第一次安裝,為了操作簡(jiǎn)便,沒有安裝 GTM-Standby,節(jié)點(diǎn)和 GTM-PRoxy,這兩個(gè)節(jié)點(diǎn)可以后期測(cè)試。
| 192.168.1.35GTM節(jié)點(diǎn): gtm 6666協(xié)調(diào)節(jié)點(diǎn)一: coord1 1921協(xié)調(diào)節(jié)點(diǎn)二: coord1 1925 192.168.1.36數(shù)據(jù)節(jié)點(diǎn)一: db_1 15431數(shù)據(jù)節(jié)點(diǎn)二: db_2 15432 |
--1.4 安裝規(guī)劃圖

二 系統(tǒng)配置 ( 兩臺(tái) )--2.1 創(chuàng)建 pgxc 系統(tǒng)用戶并賦權(quán)[root@redhatB bin]# groupadd pgxc[root@redhatB bin]# useradd pgxc -g pgxc [root@redhatB bin]# passwd pgxcChanging passWord for user pgxc.New password: BAD PASSWORD: it is based on a dictionary wordRetype new password: passwd: all authentication tokens updated successfully.
[root@redhatB pgxc]# chown -R pgxc:pgxc /pgdata_xc
--2.2 系統(tǒng)層面其它配置
根據(jù)需要配置其它系統(tǒng)層參數(shù),由于是在虛擬機(jī)上運(yùn)行,其它系統(tǒng)參數(shù)暫不修改。
三 安裝 postgresql-xc ( 兩臺(tái)都安裝 )--3.1 pgxc_v1.0beta2 下載https://sourceforge.net/projects/postgres-xc/files/下載 pgxc_v1.0beta2.tar.gz
--3.2 將安裝包解壓 ( 兩臺(tái) )
| cd /opt/soft_baktar zxvf pgxc_v1.0beta2.tar.gz |
備注:解壓后,產(chǎn)生目錄 pgxc
-3.3 -配置
| ./configure --prefix=/opt/pgsql_xc --with-segsize=8 --with-wal-segsize=64 --with-wal-blocksize=64 --with-perl --with-python --with-openssl --with-pam --with-ldap --with-libxml --with-libxslt --enable-thread-safety |
備注:conifugre 過程中如有提示缺少相關(guān)包,yum 安裝即可。
--3.4 編譯
| gmake |
備 注:編譯后,如果出現(xiàn)"All of PostgreSQL successfully made. Ready to install.",說明編譯成功。 --3.5 安裝 PostgreSQL XC
| gmake install |
備注:安裝后如果提示 "PostgreSQL installation complete." 說明安裝成功。 四 配置數(shù)據(jù)節(jié)點(diǎn) ( 192.168.1.36 ) --4.1 修改環(huán)境變量( .bash_profile )
| export PGPORT=15431export PGDATA=/pgdata_xc/db_1/pg_rootexport LANG=en_US.utf8 export PGHOME=/opt/pgsql_xcexport LD_LIBRARY_PATH=$PGHOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/libexport DATE=`date +"%Y%m%d%H%M"`export PATH=$PGHOME/bin:$PATH:.export MANPATH=$PGHOME/share/man:$MANPATHalias rm='rm -i'alias ll='ls -lh' |
--4.2 創(chuàng)建數(shù)據(jù)目錄
| pgxc@redhatB pgdata_xc]$ mkdir -p /pgdata_xc/db_1/pg_root[pgxc@redhatB pgdata_xc]$ mkdir -p /pgdata_xc/db_2/pg_root |
--4.3 初始化數(shù)據(jù)節(jié)點(diǎn)1
| initdb -D /pgdata_xc/db_1/pg_root --nodename db_1 -E UTF8 --locale=C -U postgres -W |
--4.4 修改數(shù)據(jù)節(jié)點(diǎn)一配置文件 postgresql.conf 參數(shù)
| # - Connection Settings -port = 15431 # - Where to Log -log_destination = 'csvlog'logging_collector = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'log_truncate_on_rotation = on log_rotation_age = 1d log_rotation_size = 10MB gtm_host = 'localhost' # GTM CONNECTIONgtm_host = '192.168.1.35'gtm_port = 6666 pgxc_node_name = 'db_1' # DATA NODES AND CONNECTION POOLINGpooler_port = 6667 max_pool_size = 100 |
--4.5修改數(shù)據(jù)節(jié)點(diǎn)一 pg_hba.conf ,增加以下
| host all all 192.168.1.35/32 trusthost all all 0.0.0.0/0 md5 |
--4.6 初始化數(shù)據(jù)節(jié)點(diǎn)2
| initdb -D /pgdata_xc/db_2/pg_root --nodename db_2 -E UTF8 --locale=C -U postgres -W |
--4.7 修改數(shù)據(jù)節(jié)點(diǎn)二配置文件 postgresql.conf 參數(shù)
| # - Connection Settings -port = 15432 # - Where to Log -log_destination = 'csvlog'logging_collector = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'log_truncate_on_rotation = on log_rotation_age = 1d log_rotation_size = 10MB gtm_host = 'localhost' # GTM CONNECTIONgtm_host = '192.168.1.35'gtm_port = 6666 pgxc_node_name = 'db_2' # DATA NODES AND CONNECTION POOLINGpooler_port = 6667 max_pool_size = 100 |
--4.8 修改數(shù)據(jù)節(jié)點(diǎn)一 pg_hba.conf ,增加以下
| host all all 192.168.1.35/32 trusthost all all 0.0.0.0/0 md5 |
| export PGPORT=1921export PGDATA=/database/1922/pgdata1/pgdata_xc/coord1export LANG=en_US.utf8 export PGHOME=/opt/pgsql_xc export LD_LIBRARY_PATH=$PGHOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/libexport DATE=`date +"%Y%m%d%H%M"`export PATH=$PGHOME/bin:$PATH:.export MANPATH=$PGHOME/share/man:$MANPATHalias rm='rm -i'alias ll='ls -lh' |
--5.2 創(chuàng)建 gtm 數(shù)據(jù)目錄
| [pgxc@redhat6 pgdata_xc]$ mkdir -p /database/1922/pgdata1/pgdata_xc/gtm |
--5.3 install gtm
[pgxc@redhat6 bin]$ initgtm -Z gtm -D /database/1922/pgdata1/pgdata_xc/gtmThe files belonging to this GTM system will be owned by user "pgxc".This user must also own the server process. fixing permissions on existing directory /database/1922/pgdata1/pgdata_xc/gtm ... okcreating configuration files ... ok Success. You can now start the GTM server using: gtm -D /database/1922/pgdata1/pgdata_xc/gtmor gtm_ctl -Z gtm -D /database/1922/pgdata1/pgdata_xc/gtm -l logfile start |
六 配置 coordinator 節(jié)點(diǎn)--6.1 創(chuàng)建 coordinator 數(shù)據(jù)目錄
| [pgxc@redhat6 pgdata_xc]$ mkdir -p /database/1922/pgdata1/pgdata_xc/coord1[pgxc@redhat6 pgdata_xc]$ mkdir -p /database/1922/pgdata1/pgdata_xc/coord2 |
--6.2 install coord1
| initdb -D /database/1922/pgdata1/pgdata_xc/coord1 --nodename coord1 -E UTF8 --locale=C -U postgres -W |
--6.3 修改 coord1 配置文件 postgresql.conf
| # - Connection Settings -listen_addresses = '*'port = 1921 # - Where to Log -log_destination = 'csvlog'logging_collector = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'log_truncate_on_rotation = on log_rotation_age = 1d log_rotation_size = 10MB gtm_host = 'localhost' # GTM CONNECTIONgtm_host = 'localhost'gtm_port = 6666 pgxc_node_name = 'coord1' # DATA NODES AND CONNECTION POOLINGpooler_port = 6667max_pool_size = 100 |
--6.4 配置 coord1 pg_hba.conf
| host all all 192.168.1.36/32 trusthost all all 0.0.0.0/0 md5 |
--6.5 install coord2
| initdb -D /database/1922/pgdata1/pgdata_xc/coord2 --nodename coord2 -E UTF8 --locale=C -U postgres -W |
--6.6 配置 coord2 配置文件 postgresql.conf
| # - Connection Settings -listen_addresses = '*'port = 1925 # - Where to Log -log_destination = 'csvlog'logging_collector = on log_directory = 'pg_log' log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'log_truncate_on_rotation = on log_rotation_age = 1d log_rotation_size = 10MB gtm_host = 'localhost' # GTM CONNECTIONgtm_host = 'localhost'gtm_port = 6666 pgxc_node_name = 'coord2' # DATA NODES AND CONNECTION POOLINGpooler_port = 6668max_pool_size = 100 |
--6.7 配置 coord1 pg_hba.conf
| host all all 192.168.1.36/32 trusthost all all 0.0.0.0/0 md5 |
--6.8 修改防火墻,打開相應(yīng)端口 ( 兩臺(tái)) 為了測(cè)試簡(jiǎn)便,先暫時(shí)關(guān)閉防火墻和 seliniux。
七 啟動(dòng) PostgreSQL-XC--7.1 start gtm
| [pgxc@redhat6 bin]$ gtm -D /database/1922/pgdata1/pgdata_xc/gtm & [1] 6185 |
--查看 gtm 是否啟動(dòng)
| [pgxc@redhat6 bin]$ gtm_ctl status -S gtm -D /database/1922/pgdata1/pgdata_xc/gtmpid: 6185data: /database/1922/pgdata1/pgdata_xc/gtmactive: 1 [pgxc@redhat6 bin]$ ps -ef | grep gtmpgxc 6185 6135 0 20:50 pts/4 00:00:00 gtm -D /database/1922/pgdata1/pgdata_xc/gtm |
備注: gtm 進(jìn)程已經(jīng)正常啟動(dòng)。
--7.2 啟動(dòng)數(shù)據(jù)節(jié)點(diǎn)( 192.168.1.36 )
| postgres -X -D /pgdata_xc/db_1/pg_root -p 15431 -i &postgres -X -D /pgdata_xc/db_2/pg_root -p 15432 -i & |
備注:-X 表示 datanode 節(jié)點(diǎn)。
-- 查看數(shù)據(jù)節(jié)點(diǎn)是否啟動(dòng)
| [pgxc@redhatB pg_log]$ ps -ef | grep pgxcroot 371 351 0 09:16 pts/0 00:00:00 su - pgxcpgxc 372 371 0 09:16 pts/0 00:00:00 -bashroot 420 398 0 09:16 pts/1 00:00:00 su - pgxcpgxc 421 420 0 09:16 pts/1 00:00:00 -bashpgxc 588 421 0 09:28 pts/1 00:00:00 postgres -X -D /pgdata_xc/db_1/pg_root -p 15431 -ipgxc 589 588 0 09:28 ? 00:00:00 postgres: logger process pgxc 591 588 0 09:28 ? 00:00:00 postgres: writer process pgxc 592 588 0 09:28 ? 00:00:00 postgres: wal writer process pgxc 593 588 0 09:28 ? 00:00:00 postgres: autovacuum launcher process pgxc 594 588 0 09:28 ? 00:00:00 postgres: stats collector process pgxc 595 421 0 09:28 pts/1 00:00:00 postgres -X -D /pgdata_xc/db_2/pg_root -p 15432 -ipgxc 596 595 0 09:28 ? 00:00:00 postgres: logger process pgxc 598 595 0 09:28 ? 00:00:00 postgres: writer process pgxc 599 595 0 09:28 ? 00:00:00 postgres: wal writer process pgxc 600 595 0 09:28 ? 00:00:00 postgres: autovacuum launcher process pgxc 601 595 0 09:28 ? 00:00:00 postgres: stats collector process |
--7.3 啟動(dòng) coordinator 節(jié)點(diǎn)
| postgres -C -D /database/1922/pgdata1/pgdata_xc/coord1 -p 1921 -i &postgres -C -D /database/1922/pgdata1/pgdata_xc/coord2 -p 1925 -i & |
備注:-C 表示 coordinator 節(jié)點(diǎn)。
--查看 coordinator 節(jié)點(diǎn)是否啟來
| pgxc 11633 8961 0 10:25 pts/3 00:00:00 postgres -C -D /database/1922/pgdata1/pgdata_xc/coord1 -p 1921 -ipgxc 11634 11633 0 10:25 ? 00:00:00 postgres: logger process pgxc 11637 11633 0 10:25 ? 00:00:00 postgres: pooler process pgxc 11638 11633 0 10:25 ? 00:00:00 postgres: writer process pgxc 11639 11633 0 10:25 ? 00:00:00 postgres: wal writer process pgxc 11640 11633 0 10:25 ? 00:00:00 postgres: autovacuum launcher process pgxc 11641 11633 0 10:25 ? 00:00:00 postgres: stats collector process pgxc 11643 8961 0 10:25 pts/3 00:00:00 postgres -C -D /database/1922/pgdata1/pgdata_xc/coord2 -p 1925 -ipgxc 11644 11643 0 10:26 ? 00:00:00 postgres: logger process pgxc 11647 11643 0 10:26 ? 00:00:00 postgres: pooler process pgxc 11648 11643 0 10:26 ? 00:00:00 postgres: writer process pgxc 11649 11643 0 10:26 ? 00:00:00 postgres: wal writer process pgxc 11650 11643 0 10:26 ? 00:00:00 postgres: autovacuum launcher process pgxc 11651 11643 0 10:26 ? 00:00:00 postgres: stats collector process pgxc 12203 11633 0 10:53 ? 00:00:00 postgres: postgres postgres ::1(13531) idle pgxc 12372 11643 0 11:01 ? 00:00:00 postgres: postgres postgres ::1(14789) idle pgxc 12661 11643 0 11:16 ? 00:00:00 postgres: francs francs ::1(14825) idle |
備注:coord1,coord2 節(jié)點(diǎn)分別多了個(gè) pooler process 進(jìn)程,pooler process 用來與數(shù)據(jù)節(jié)點(diǎn)進(jìn)行通信的。
--7.4 查看GTM,POOL連接
| [root@redhat6 ~]# netstat -anp | grep gtmtcp 0 0 0.0.0.0:6666 0.0.0.0:* LISTEN 11620/gtm tcp 0 0 :::6666 :::* LISTEN 11620/gtm tcp 0 0 ::1:6666 ::1:52228 ESTABLISHED 11620/gtm [root@redhat6 ~]# ps -ef | grep poolpgxc 11637 11633 0 10:25 ? 00:00:00 postgres: pooler process pgxc 11647 11643 0 10:26 ? 00:00:00 postgres: pooler process root 13375 11658 0 11:53 pts/2 00:00:00 grep pool |
備注:如果到了這步,沒有看到 pooler process ,或者沒有 gtm 相關(guān)連接,說明配置有問題。
八:注冊(cè)節(jié)點(diǎn)--8.4 在 coord1,cord2 上注冊(cè)數(shù)據(jù)節(jié)點(diǎn)
| CREATE NODE db_1 WITH (TYPE='datanode',HOST = '192.168.1.36', PORT=15431);CREATE NODE db_2 WITH (TYPE='datanode',HOST = '192.168.1.36', PORT=15432);CREATE NODE coord2 WITH (TYPE='coordinator',HOST = 'localhost', PORT=1925);CREATE NODE coord1 WITH (TYPE='coordinator',HOST = 'localhost', PORT=1921); |
| [pgxc@redhat6 gtm]$ psql -p 1921 -U postgrespsql (PGXC 1.0beta2, based on PG 9.1.3)Type "help" for help. postgres=# select * from pgxc_node; node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -----------+-----------+-----------+-----------+----------------+------------------+------------ coord1 | C | 5432 | localhost | f | f | 1885696643(1 row) postgres=# CREATE NODE db_1 WITH (TYPE='datanode',HOST = '192.168.1.36', PORT=15431,PRIMARY, PREFERRED);CREATE NODEpostgres=# CREATE NODE db_2 WITH (TYPE='datanode',HOST = '192.168.1.36', PORT=15432);CREATE NODEpostgres=# CREATE NODE coord2 WITH (TYPE='coordinator',HOST = '192.168.1.35', PORT=1925);CREATE NODEpostgres=# select * from pgxc_node; node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -----------+-----------+-----------+--------------+----------------+------------------+------------- coord1 | C | 5432 | localhost | f | f | 1885696643 db_1 | D | 15431 | 192.168.1.36 | f | f | 1356996994 db_2 | D | 15432 | 192.168.1.36 | f | f | -822936791 coord2 | C | 1925 | localhost | f | f | -1197102633 postgres=# select pgxc_pool_reload(); pgxc_pool_reload ------------------ t(1 row) |
備注:到了這里, PostgreSQL-XC 安裝完成,接下來驗(yàn)證下。
九 測(cè)試--9.1 coord1 創(chuàng)建測(cè)試庫和表
| [pgxc@redhat6 coord2]$ psql -p 1921 -U postgrespsql (PGXC 1.0beta2, based on PG 9.1.3)Type "help" for help. postgres=# /l List of databases Name | Owner | Encoding | Collate | Ctype | access privileges -----------+----------+----------+---------+-------+------------------------ francs | postgres | UTF8 | C | C | =Tc/postgres + | | | | | postgres=CTc/postgres + | | | | | francs=C*T*c*/postgres postgres | postgres | UTF8 | C | C | template0 | postgres | UTF8 | C | C | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | C | C | =c/postgres + | | | | | postgres=CTc/postgres(4 rows) postgres=# create database test_xc;CREATE DATABASE postgres=# /l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+---------+-------+------------------------ postgres | postgres | UTF8 | C | C | template0 | postgres | UTF8 | C | C | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | C | C | =c/postgres + | | | | | postgres=CTc/postgres test_xc | postgres | UTF8 | C | C |(5 rows) postgres=# /c test_xcYou are now connected to database "test_xc" as user "postgres".test_xc=# create table test_1 (id integer,name varchar(32));CREATE TABLEtest_xc=# insert into test_1 select generate_series(1,100),'test_xc';INSERT 0 100 |
備注:在 coord1 節(jié)點(diǎn)上創(chuàng)建了測(cè)試庫 test_xc,并在里面創(chuàng)建了一張表,接下來看看 coord2, db_1,db_2 節(jié)點(diǎn)情況。
--9.2 coord2 上驗(yàn)證
| [pgxc@redhat6 pg_log]$ psql -p 1925 -U postgrespsql (PGXC 1.0beta2, based on PG 9.1.3)Type "help" for help. postgres=# /l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+---------+-------+------------------------ postgres | postgres | UTF8 | C | C | template0 | postgres | UTF8 | C | C | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | C | C | =c/postgres + | | | | | postgres=CTc/postgres test_xc | postgres | UTF8 | C | C | (5 rows) postgres=# /c test_xcYou are now connected to database "test_xc" as user "postgres".test_xc=# /d List of relations Schema | Name | Type | Owner --------+--------+-------+---------- public | test_1 | table | postgres(1 row) test_xc=# select count(*) from test_1; count ------- 100(1 row) |
--9.3 數(shù)據(jù)節(jié)點(diǎn) db_1 上驗(yàn)證
| [pgxc@redhatB pg_log]$ psql -p 15431 -U postgres -d test_xcpsql (PGXC 1.0beta2, based on PG 9.1.3)Type "help" for help. test_xc=# /dWARNING: Do not have a GTM snapshot availableWARNING: Do not have a GTM snapshot available List of relations Schema | Name | Type | Owner --------+--------+-------+---------- public | test_1 | table | postgres(1 row) test_xc=# select count(*) from test_1;WARNING: Do not have a GTM snapshot availableWARNING: Do not have a GTM snapshot available count ------- 42(1 row) |
--9.4 數(shù)據(jù)節(jié)點(diǎn) db_2 上驗(yàn)證
| [pgxc@redhatB pg_log]$ psql -p 15432 -U postgres -d test_xcpsql (PGXC 1.0beta2, based on PG 9.1.3)Type "help" for help. test_xc=# select count(*) from test_1;WARNING: Do not have a GTM snapshot availableWARNING: Do not have a GTM snapshot available count ------- 58(1 row) |
備注:表共有100條記錄,數(shù)據(jù)節(jié)點(diǎn)一分布了 42 條,數(shù)據(jù)節(jié)點(diǎn)二分布了 58 條,可見數(shù)據(jù)已經(jīng)分片到數(shù)據(jù)節(jié)點(diǎn)上。 當(dāng)然在創(chuàng)建表時(shí),也可以設(shè)置 replication 模式,這樣數(shù)據(jù)就會(huì)完全復(fù)制到每個(gè)節(jié)點(diǎn)。
十 可能出現(xiàn)的ERROR
| [pgxc@redhat6 coord1]$ psql -p 1921 -U postgrespostgres=# create database test;ERROR: Failed to get pooled connections |
備注:如果在 coord1 節(jié)點(diǎn)上操作時(shí),報(bào) "ERROR: Failed to get pooled connections",可能的原因很多, 可能是節(jié)點(diǎn)沒有注冊(cè)好,這時(shí)要查看 pgxc_node 視圖;也有可能是 pg_hba.conf,防火墻,selinux 等問題,總之逐一排查。
十一 總結(jié)
1 本次測(cè)試只是簡(jiǎn)單將 PostgreSQL-XC 搭建起來了,其中 gmt_standby ,GTM-Proxy 沒有配置,這個(gè)以后可
以測(cè)試下;
2 由于在 PostgreSQL-XC 體系中,coordinator 并不存儲(chǔ)數(shù)據(jù),數(shù)據(jù)被分片在數(shù)據(jù)節(jié)點(diǎn)中,這種機(jī)制與GreenPlumn
有點(diǎn)類似;而 coordinator 節(jié)點(diǎn)新增了 pooler process 進(jìn)程,個(gè)人覺得 coordinator 很像一個(gè)連接池。
3 PostgreSQL-XC 所謂的多主節(jié)點(diǎn)( muti-master) 同時(shí)對(duì)外服務(wù),實(shí)際上對(duì)應(yīng)用服務(wù)的是 coordinator 節(jié)點(diǎn),而
不是數(shù)據(jù) 節(jié)點(diǎn)本身;原來俺的理解是數(shù)據(jù)節(jié)點(diǎn)同時(shí)讀寫(多份數(shù)據(jù),mater 同時(shí)讀寫),而在 PostgreSQL-XC 中
并不是這樣。
4 由于每個(gè)數(shù)據(jù)節(jié)點(diǎn)存儲(chǔ)一部分?jǐn)?shù)據(jù),那么如果數(shù)據(jù)節(jié)點(diǎn) down 掉,整個(gè) PostgreSQL-XC 將不可用,不知是否有
更好的方案,例如給每個(gè)數(shù)據(jù)節(jié)點(diǎn)配置個(gè) standby 節(jié)點(diǎn)?
5 由于在 PostgreSQL-XC 體系中數(shù)據(jù)分片在多個(gè)數(shù)據(jù)節(jié)點(diǎn)中,IO 性能會(huì)提升,同時(shí)對(duì)網(wǎng)絡(luò)壓力會(huì)提升;具體性能
目前還沒有測(cè)試。
6 盡管疑問重多,但還是要感謝來自日本的 PostgreSQL-XC 開發(fā)團(tuán)隊(duì),他們?yōu)?PostgreSQL 帶來了 muti-master
的集群方案。
十二 參考http://postgres-xc.sourceforge.net/http://postgres-xc.sourceforge.net/docs/1_0/index.html/http://blog.163.com/digoal@126/blog/static/16387704020121952051174/http://michael.otacoo.com/tag/postgres-xc/
|
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注