PGXC_CTL Primer
Configuring and operating Postgres-XC database cluster
May 7th, 2014
Koichi Suzuki
1. Introduction
ThisdocumentisanoutlineofPostgresXCdatabaseclusterconfigurationandoperation
usingpgxc_ctl.Pgxc_ctlwillbefoundinthecontribmoduleofpostgresxcdistribution.
ThismodulehelpstoconfigureandoperateyourPostgresXCdatabaseclustereasily.This
savesmuchofthesmallbutimportantthings.
2. Plannings you Postgres-XC cluster
2.1 Postgres-XC overview
BeforegoingintoPostgresXCconfiguration,pleasetakeabittoconsiderifPostgresXC
clusterisusefultoyourapplication.UnlikeanyotherPostgreSQLreplicationcluster,
PostgresXCiswritescalablePostgreSQLcluster.Moreserversyouhave,more
throughputyouget,bothinreadandwrite.Ofcourse,youcanhandlebiggerdatabsaeif
youhavemoreserversandstorages.
Toachievethis,youshouldconsidereachtabletobedistributed(sharded)orreplicated.If
tablesareupdatedveryfrequently,youshouldconsiderthemtobedistributed.Iftheyare
relativelystaticandarereferedbydistributedtableorotherreplicatedtables,youshould
considerthemtobereplicated.Thismixturewillmakemostoftheupdatelocaltooneofthe
datanode.Becauseeachdatanodeoperatesinparalle,youcangetbothreadandwrite
scalability.
Youcanconnecttoanyofthecoordinators ,eachofwhichprovidesfulltransactionACID
1
capabiliyandtransparentviewtothedatabase.Thatis,anyupdateyoumakeatany
coordinatorisvisibletoanyotherapplicationsconnectedtoanycoordinatorswithoutdelay.
Itbehavesjustlikesingledatabase.
Fromyourapplication,PostgresXCclusterwillbeseenasshowninFigure1.
1
Coordinatorisacomponentyourapplicationshouldconnectto.XChasseveralothercomponent
suchasdatanode,GTMandGTMproxy.Theywillbedescribedsomemoreindatailinthenext
section.
-1/56 -
评论