SlideShare una empresa de Scribd logo
1 de 46
Descargar para leer sin conexión
NTT DATA Intellilink Corporation
Postgres-XC Dynamic Cluster
Management
Koichi Suzuki
Postgres-XC Development Group
Postgres Open 2013
September 17th, 2013
Hotel Sax, Chicago, USA
NTT DATA Intellilink Corporation
2Postgres-XC Cluster Management
Sept. 18th, 2013
Outline of the Talk
●
Postgres-XC short review
– Architecture and scalability
●
Configurating Postgres-XC
– Manual configuration
– Dedicated tools
●
Operating Postgres-XC
●
Postgres-XC node management
– Dynamic node addition/removal
●
Failure handling and HA
●
Current status and future schedule
NTT DATA Intellilink Corporation
3Postgres-XC Cluster Management
Sept. 18th, 2013
Self Introduction
●
Postgres-XC leader and core architect, as well as a
core developer
– Whole architecture design
– Global transaction management and data distribution as a
key for write-scalability
●
Work for NTT DATA Intellilink
– Subsidiary of NTT DATA corporation dedicated for system
platform
– Member of NTT group company
●
Resources
– koichi.clarinet@gmail.com (facebook, linkedin)
– @koichiclarinet (twitter)
Sept. 18th, 2013 Postgres-XC Cluster Management 4
NTT DATA Intellilink Corporation
Postgres-XC Short Review
NTT DATA Intellilink Corporation
5Postgres-XC Cluster Management
Sept. 18th, 2013
Useful Materials
●
Postgres-XC
– http://postgres-xc.sourceforge.net/ (project web site)
– http://sourceforge.net/projects/postgres-xc/ (development site)
– http://postgres-xc.sourceforge.net/misc-
docs/20120614_PGXC_Tutorial_global.pdf (Postgres-XC tutorial)
– http://postgres-xc.sourceforge.net/misc-
docs/Prague_Presentation_20121024.pdf (HA architecture and feature)
– http://postgresxc.wikia.com/wiki/File:Postgres-XC_20110711_01.pdf
(General architecture and feature)
●
PostgreSQL resource agents for Pacemaker/Heartbeat
– sf-ex : mount filesystem exclusively
●
https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/sfex
– postgres – streaming replication
●
https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/pgsql
NTT DATA Intellilink Corporation
6Postgres-XC Cluster Management
Sept. 18th, 2013
Postgres-XC in Postgres Open
●
2011
– Postgres-XC inroduction
– Architecture, scalability
●
2012
– Postgres-XC internals
– SQL planning and execution
●
2013
– Deployment, configuration, operation
– Slaves for high-availability
– Cluster management
NTT DATA Intellilink Corporation
7Postgres-XC Cluster Management
Sept. 18th, 2013
Postgres-XC 1.1
●
Dynamic node addition/removal
– Related new options to initidb, pg_dump, and pg_dumpall
– DDL lock during node addition/removal
– Table re-distribution
●
Row-level triggers
●
RETURNING
●
pgxc_ctl operation tool
●
Many distributed SQL planner improvements
– Outer joins
– LIMIT, ORDER BY, GROUP BY pushdown
●
Executor improvement
– Merge and hash-join at the coordinator
– Distributed sort and merge at datanodes
●
Others
– PostgreSQL 9.2.4 merge
– GTM restore point backup
Sept. 18th, 2013 Postgres-XC Cluster Management 8
NTT DATA Intellilink Corporation
Configuring Postgres-XC
NTT DATA Intellilink Corporation
9Postgres-XC Cluster Management
Sept. 18th, 2013
Manual Operation
●
Configure postgresql.conf for all the components
– Coordinator
– Datanode
●
Configure node configuration by CREATE|ALTER
NODE
– Has to repeat for all the coordinators
● Could be very painful
● Operation such as Start/Stop/Failover/Add
nodes/Remove nodes could be complicated
too
NTT DATA Intellilink Corporation
11Postgres-XC Cluster Management
Sept. 18th, 2013
Overview of pgxc_ctl
●
Command line tool
●
Takes care of Postgres-XC database cluster operation
– Configuration/Initialization
– Start/stop
– Simple monitoring
– Failover
– Add/remove components dynamically.
NTT DATA Intellilink Corporation
12Postgres-XC Cluster Management
Sept. 18th, 2013
Configuration (1)
●
Configuration file is a bash-script
– Easy to customize
– Flexible configuration definitions
# pgxcInstallDir variable is needed if you invoke "deploy" command from pgxc_ctl utility.
# If don't you don't need this variable.
pgxcInstallDir=$HOME/pgxc
#---- OVERALL -----------------------------------------------------------------------------
#
pgxcOwner=koichi # owner of the Postgres-XC databaseo cluster. Here, we use this
# both as linus user and database user. This must be
# the super user of each coordinator and datanode.
pgxcUser=$pgxcOwner # OS user of Postgres-XC owner
tmpDir=/tmp # temporary dir used in XC servers
localTmpDir=$tmpDir # temporary dir used here locally
configBackup=n # If you want config file backup
configBackupHost=yourBackupHost # host to backup config file
configBackupDir=yourBackupDir # Backup directory
configBackupFile=yourBackupFile # Backup file name --> Need to synchronize when original changed.
#---- GTM ------------------------------------------------------------------------------------
#---- Overall -------
gtmName=gtm
#---- GTM Master -----------------------------------------------
#---- Overall ----
gtmMasterServer=node13
gtmMasterPort=20001
gtmMasterDir=$HOME/pgxc/nodes/gtm
NTT DATA Intellilink Corporation
13Postgres-XC Cluster Management
Sept. 18th, 2013
Configuration(2)
●
Each component needs
– Nodename
– Hostname/address
– Port
– Work Directory
– (Coordinator needs additional pooler port)
– (Coordinator/Datanode slave needs WAL archive directory)
– Specific configuration parameters.
●
You can specify these configuration for each component
●
Pgxc_ctl will take care of everything else.
●
Example will be given later.
NTT DATA Intellilink Corporation
14Postgres-XC Cluster Management
Sept. 18th, 2013
Demonstration
●
Configuration file template
– prepare command
●
Configuration/Initialization
– clean command
– init command
●
Start/stop
– start command
– stop command
– kill command
●
Selecting coordnator automatically
– Createdb
– Createuser
– Dropdb
– Psql
●
Failover
– failover command
– reconnect command
●
Add/remove components dynamically
– Add command
– Remove command
●
Table re-distribution
– ALTER TABLE statement
NTT DATA Intellilink Corporation
15Postgres-XC Cluster Management
Sept. 18th, 2013
Configuration Specifics
●
You should specify
– GTM master (mandatory)
– GTM slave (optional)
– GTM Proxy (optional, needed for HA)
– Coordinator master (at least one)
– Coordinator slave (optional)
– Datanode master (at least one)
– Datanode slave (optional)
NTT DATA Intellilink Corporation
16Postgres-XC Cluster Management
Sept. 18th, 2013
Overall Configuration
# pgxcInstallDir variable is needed if you invoke "deploy" command from pgxc_ctl utility.
# If don't you don't need this variable.
pgxcInstallDir=$HOME/pgxc
#---- OVERALL -----------------------------------------------------------------------------
#
pgxcOwner=koichi # owner of the Postgres-XC databaseo cluster. Here, we use this
# both as linus user and database user. This must be
# the super user of each coordinator and datanode.
pgxcUser=$pgxcOwner # OS user of Postgres-XC owner
tmpDir=/tmp # temporary dir used in XC servers
localTmpDir=$tmpDir # temporary dir used here locally
configBackup=n # If you want config file backup
configBackupHost=yourBackupHost # host to backup config file
configBackupDir=yourBackupDir # Backup directory
configBackupFile=yourBackupFile # Backup file name --> Need to synchronize when original changed.
NTT DATA Intellilink Corporation
17Postgres-XC Cluster Management
Sept. 18th, 2013
GTM Master
#---- GTM ------------------------------------------------------------------------------------
# GTM is mandatory. You must have at least (and only) one GTM master in your Postgres-XC cluster.
# If GTM crashes and you need to reconfigure it, you can do it by pgxc_update_gtm command to update
# GTM master with others. Of course, we provide pgxc_remove_gtm command to remove it. This command
# will not stop the current GTM. It is up to the operator.
#---- Overall -------
gtmName=gtm
#---- GTM Master -----------------------------------------------
#---- Overall ----
gtmMasterServer=node13
gtmMasterPort=20001
gtmMasterDir=$HOME/pgxc/nodes/gtm
#---- Configuration ---
gtmExtraConfig=none # Will be added gtm.conf for both Master and Slave (done at initilization only)
gtmMasterSpecificExtraConfig=none # Will be added to Master's gtm.conf (done at initialization only)
NTT DATA Intellilink Corporation
18Postgres-XC Cluster Management
Sept. 18th, 2013
GTM Slave
#---- GTM Slave -----------------------------------------------
# Because GTM is a key component to maintain database consistency, you may want to configure GTM slave
# for backup.
#---- Overall ------
gtmSlave=y # Specify y if you configure GTM Slave. Otherwise, GTM slave will not be configured and
# all the following variables will be reset.
gtmSlaveServer=node12 # value none means GTM slave is not available.
# Give none if you don't configure GTM Slave.
GtmSlavePort=20001 # Not used if you don't configure GTM slave.
gtmSlaveDir=$HOME/pgxc/nodes/gtm # Not used if you don't configure GTM slave.
# Please note that when you have GTM failover, then there will be no slave available until you configure the slave
# again. (pgxc_add_gtm_slave function will handle it)
#---- Configuration ----
gtmSlaveSpecificExtraConfig=none # Will be added to Slave's gtm.conf (done at initialization only)
NTT DATA Intellilink Corporation
19Postgres-XC Cluster Management
Sept. 18th, 2013
GTM Proxy
#---- GTM Proxy -------------------------------------------------------------------------------------------------------
# GTM proxy will be selected based upon which server each component runs on.
# When fails over to the slave, the slave inherits its master's gtm proxy. It should be
# reconfigured based upon the new location.
#
# To do so, slave should be restarted. So pg_ctl promote -> (edit postgresql.conf and recovery.conf) -> pg_ctl restart
#
# You don't have to configure GTM Proxy if you dont' configure GTM slave or you are happy if every component
connects
# to GTM Master directly. If you configure GTL slave, you must configure GTM proxy too.
#---- Shortcuts ------
gtmProxyDir=$HOME/pgxc/nodes/gtm_pxy
#---- Overall -------
gtmProxy=y # Specify y if you conifugre at least one GTM proxy. You may not configure gtm proxies
# only when you dont' configure GTM slaves.
# If you specify this value not to y, the following parameters will be set to default empty values.
# If we find there're no valid Proxy server names (means, every servers are specified
# as none), then gtmProxy value will be set to "n" and all the entries will be set to
# empty values.
gtmProxyNames=(gtm_pxy1 gtm_pxy2 gtm_pxy3 gtm_pxy4) # No used if it is not configured
gtmProxyServers=(node06 node07 node08 node09) # Specify none if you dont' configure it.
gtmProxyPorts=(20001 20001 20001 20001) # Not used if it is not configured.
gtmProxyDirs=($gtmProxyDir $gtmProxyDir $gtmProxyDir $gtmProxyDir) # Not used if it is not configured.
#---- Configuration ----
gtmPxyExtraConfig=none # Extra configuration parameter for gtm_proxy
gtmPxySpecificExtraConfig=(none none none none)
NTT DATA Intellilink Corporation
20Postgres-XC Cluster Management
Sept. 18th, 2013
Coordinator Common
#---- Coordinators ----------------------------------------------------------------------------------------------------
#---- shortcuts ----------
coordMasterDir=$HOME/pgxc/nodes/coord
coordSlaveDir=$HOME/pgxc/nodes/coord_slave
coordArchLogDir=$HOME/pgxc/nodes/coord_archlog
#---- Overall ------------
coordNames=(coord1 coord2 coord3 coord4) # Master and slave use the same name
coordPorts=(20004 20005 20004 20005) # Master and slave use the same port
poolerPorts=(20010 20011 20010 20011) # Master and slave use the same pooler port
coordPgHbaEntries=(192.168.1.0/24) # Assumes that all the coordinator (master/slave) accepts
# the same connection
# This entry allows only $pgxcOwner to connect.
# If you'd like to setup another connection, you should
# supply these entries through files specified below.
# Note: The above parameter is extracted as "host all all 0.0.0.0/0 trust". If you don't want
# such setups, specify the value () to this variable and suplly what you want using coordExtraPgHba
# and/or coordSpecificExtraPgHba variables.
NTT DATA Intellilink Corporation
21Postgres-XC Cluster Management
Sept. 18th, 2013
Coordinator Master
#---- Master -------------
coordMasterServers=(node06 node07 node08 node09) # none means this master is not available
coordMasterDirs=($coordMasterDir $coordMasterDir $coordMasterDir $coordMasterDir)
CoordMaxWALsernder=5 # max_wal_senders: needed to configure slave. If zero value is specified,
# it is expected to supply this parameter explicitly by external files
# specified in the following. If you don't configure slaves, leave this value to zero.
coordMaxWALSenders=($coordMaxWALsernder $coordMaxWALsernder $coordMaxWALsernder
$coordMaxWALsernder)
# max_wal_senders configuration for each coordinator.
NTT DATA Intellilink Corporation
22Postgres-XC Cluster Management
Sept. 18th, 2013
Coordinator Slave
#---- Slave -------------
coordSlave=y # Specify y if you configure at least one coordiantor slave. Otherwise, the following
# configuration parameters will be set to empty values.
# If no effective server names are found (that is, every servers are specified as none),
# then coordSlave value will be set to n and all the following values will be set to
# empty values.
coordSlaveSync=y # Specify to connect with synchronized mode. At present, only “y” is assumed.
coordSlaveServers=(node07 node08 node09 node06) # none means this slave is not available
coordSlaveDirs=($coordSlaveDir $coordSlaveDir $coordSlaveDir $coordSlaveDir)
coordArchLogDirs=($coordArchLogDir $coordArchLogDir $coordArchLogDir $coordArchLogDir)
NTT DATA Intellilink Corporation
23Postgres-XC Cluster Management
Sept. 18th, 2013
Coordinator Extra Configuration
#---- Configuration files---
# Need these when you'd like setup specific non-default configuration
# These files will go to corresponding files for the master.
# You may supply your bash script to setup extra config lines and extra pg_hba.conf entries
# Or you may supply these files manually.
coordExtraConfig=coordExtraConfig # Extra configuration file for coordinators.
# This file will be added to all the coordinators'
# postgresql.conf
# Pleae note that the following sets up minimum parameters which you may want to change.
# You can put your postgresql.conf lines here.
cat > $coordExtraConfig <<EOF
#================================================
# Added to all the coordinator postgresql.conf
# Original: $coordExtraConfig
log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
listen_addresses = '*'
max_connections = 100
EOF
NTT DATA Intellilink Corporation
24Postgres-XC Cluster Management
Sept. 18th, 2013
Datanode Common
#---- Datanodes -------------------------------------------------------------------------------------------------------
#---- Shortcuts --------------
datanodeMasterDir=$HOME/pgxc/nodes/dn_master
datanodeSlaveDir=$HOME/pgxc/nodes/dn_slave
datanodeArchLogDir=$HOME/pgxc/nodes/datanode_archlog
#---- Overall ---------------
# At present, xc has a priblem to issue ALTER NODE against the primay node. Until it is fixed, the test will be done
# without this feature.
primaryDatanode=datanode1 # Primary Node.
datanodeNames=(datanode1 datanode2 datanode3 datanode4)
datanodePorts=(20008 20009 20008 20009) # Master and slave use the same port!
datanodePgHbaEntries=(192.168.1.0/24) # Assumes that all the coordinator (master/slave) accepts
# the same connection
# This list sets up pg_hba.conf for $pgxcOwner user.
# If you'd like to setup other entries, supply them
# through extra configuration files specified below.
# Note: The above parameter is extracted as "host all all 0.0.0.0/0 trust". If you don't want
# such setups, specify the value () to this variable and suplly what you want using datanodeExtraPgHba
# and/or datanodeSpecificExtraPgHba variables.
NTT DATA Intellilink Corporation
25Postgres-XC Cluster Management
Sept. 18th, 2013
Datanode Master
#---- Master ----------------
datanodeMasterServers=(node06 node07 node08 node09)
# none means this master is not available.
# This means that there should be the master but is down.
# The cluster is not operational until the master is
# recovered and ready to run.
datanodeMasterDirs=($datanodeMasterDir $datanodeMasterDir $datanodeMasterDir $datanodeMasterDir)
datanodeMaxWalSender=5 # max_wal_senders: needed to configure slave. If zero value is
# specified, it is expected this parameter is explicitly supplied
# by external configuration files.
# If you don't configure slaves, leave this value zero.
datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender $datanodeMaxWalSender
$datanodeMaxWalSender)
# max_wal_senders configuration for each datanode
NTT DATA Intellilink Corporation
26Postgres-XC Cluster Management
Sept. 18th, 2013
Datanode Slave
#---- Slave -----------------
datanodeSlave=y # Specify y if you configure at least one coordiantor slave. Otherwise, the following
# configuration parameters will be set to empty values.
# If no effective server names are found (that is, every servers are specified as none),
# then datanodeSlave value will be set to n and all the following values will be set to
# empty values.
datanodeSlaveServers=(node07 node08 node09 node06) # value none means this slave is not available
datanodeSlaveSync=y # If datanode slave is connected in synchronized mode
datanodeSlaveDirs=($datanodeSlaveDir $datanodeSlaveDir $datanodeSlaveDir $datanodeSlaveDir)
datanodeArchLogDirs=( $datanodeArchLogDir $datanodeArchLogDir $datanodeArchLogDir
$datanodeArchLogDir )
NTT DATA Intellilink Corporation
27Postgres-XC Cluster Management
Sept. 18th, 2013
Datanode Additional Configuration
# ---- Configuration files ---
# You may supply your bash script to setup extra config lines and extra pg_hba.conf entries here.
# These files will go to corresponding files for the master.
# Or you may supply these files manually.
datanodeExtraConfig=none # Extra configuration file for datanodes. This file will be added to all the
# datanodes' postgresql.conf
datanodeSpecificExtraConfig=(none none none none)
datanodeExtraPgHba=none # Extra entry for pg_hba.conf. This file will be added to all the
#datanodes' postgresql.conf
datanodeSpecificExtraPgHba=(none none none none)
NTT DATA Intellilink Corporation
28Postgres-XC Cluster Management
Sept. 18th, 2013
When configuration changes
#===================================================
# pgxc configuration file updated due to GTM failover
# 20130704_16:56:42
gtmMasterServer=node12
gtmMasterPort=20001
gtmMasterDir=/home/koichi/pgxc/nodes/gtm
gtmSlave=n
gtmSlaveServer=none
gtmSlavePort=0
gtmSlaveDir=none
#----End of reconfiguration -------------------------
● Failover by components failure
● Add/remove componentsc
● Configuration file is modified.
● Backed up if configured so.
Sept. 18th, 2013 Postgres-XC Cluster Management 29
NTT DATA Intellilink Corporation
SPOF Analysis
NTT DATA Intellilink Corporation
30Postgres-XC Cluster Management
Sept. 18th, 2013
Postgres-XC Single Point of Failure
●
GTM
– Obviously SPOF
●
GTM-Proxy
– No persistent data hold
– Just restart when fail
●
Coordinator
– Every coordinator is essentially a copy
– When fails, other coordinators work
●
Datanode
– SPOF for sharded table
NTT DATA Intellilink Corporation
31Postgres-XC Cluster Management
Sept. 18th, 2013
Backup for SPOF component
●
GTM
– Specific backup for GTM (GTM Standby)
●
Most information are kept on-memory
– Open TXNs
●
Only the next GXID is needed to restart whole cluster, kept on disk.
●
Copies every internal status change to the backup
– Similar to the log shipping in PostgreSQL
●
Can promote to the master
– GTM-Proxy help this failover
●
Datanode
– Need backup
– Can use PostgreSQL's means
●
Log Shipping
●
Shared disk
●
Coordinator
– Not critical but may want to have backups
– Can use similar means as Datanodes.
NTT DATA Intellilink Corporation
32Postgres-XC Cluster Management
Sept. 18th, 2013
GTM Slave (GTM Standby)
●
Same binary to GTM
– Backs up everything on the fly.
– Can promote to the master (gtm_ctl promote)
– Configure using gtm.conf
●
startup = ACT|STANDBY
●
active_host = 'active_gtm_host'
●
active_port = 8765
GTM ProxyCoordinator
Datanode
GTM
Master
GTM
Slave
Recocnnect at
failure
Recocnnect at
failure
Backup status
change
NTT DATA Intellilink Corporation
33Postgres-XC Cluster Management
Sept. 18th, 2013
Datanodes
●
Almost all the techniques for PostgreSQL
backup/failover are available
– Streaming replication
– Shared disk re-mount
●
Subject to coordinators
– Coordinators should reconfigure failed datanode at failover
– Coordinators should clean connections to failed datanode
before reconfiguration
●
GTM
– Reconnect to (new) local GTM proxy
NTT DATA Intellilink Corporation
34Postgres-XC Cluster Management
Sept. 18th, 2013
Coordinators
●
Only catalog is stored
– Very stable and static
– All the coordinators are essentially the same copy
●
Datanode HA technique can be applied
– Streaming replication
– Shared disk remount
●
One more option at a failure
– No failover
– Remaining coordinators will take care of TXNs
– Failed coordinator can be restored offline
●
Backup/restore
●
Copy catalogue from a remaining coordinator
NTT DATA Intellilink Corporation
35Postgres-XC Cluster Management
Sept. 18th, 2013
XC vs. O*R*
Feature Postgres-XC O____ R__
Background Databsae PostgreSQL O_____
Architecture Shared Nothing Shared Everything
Number of Servers Experience: 10
Maybe 20 or more
??
(Most deployments are two
server configuration)
Hardware Requirement None Shared Disk
Read Scale Yes Yes
Write Scale Yes Depends
(Application level
partitioning)
Storage Failure Limited impact
Component failover
Cluster keeps running
Whole cluster fails
Cluster-wide failover
Server Failure Affected components needs
failover
Others keep running
Remaining servers
continues service
Sept. 18th, 2013 Postgres-XC Cluster Management 36
NTT DATA Intellilink Corporation
What's Next?
NTT DATA Intellilink Corporation
37Postgres-XC Cluster Management
Sept. 18th, 2013
Current and Future Roadmap (1)
●
V1.1 (July 2013)
– Dynamic component addition/removal
– Table redistribution
– Trigger
– Returning
– Cursor
– Planner improvement
– PostgreSQL 9.2.4 merge
– Many others …
●
V1.2 (Dec. 2013)
– More robust JDBC
– Planner improvement
– PostgreSQL 9.3 merge
– GUI and HA tools (external project)
NTT DATA Intellilink Corporation
38Postgres-XC Cluster Management
Sept. 18th, 2013
Current and Future Roadmap (2)
●
V1.3 or later …
– Concurrent Table Redistribution
– Flexible function pushdown
– Coordinator/Datanode integration
– Single XC node as a standalone database
– Savepoint
– Repeatable read/SSI
– GTM Proxy as a coordinator backend
– Continue to merge with upcoming PostgreSQL
– Many more ...
Sept. 18th, 2013
Postgres-XC Cluster Management 39
Copyright © 2011 NTT DATA Corporation
NTT DATA Intellilink Corporation
Thank you very much!!
Sept. 18th, 2013 Postgres-XC Cluster Management 40
NTT DATA Intellilink Corporation
Postgres-XC Short Review
NTT DATA Intellilink Corporation
41Postgres-XC Cluster Management
Sept. 18th, 2013
What is Postgres-XC
●
Symmetric PostgerSQL cluster
– No master/slave replication
– No read-only clusters
– Every node can issue both read/write
– Every node provides single consistent database view
– Transparent transaction management
●
Not just a replication
– Each table can be replicated/distributed by sharding
– Parallel transaction/query execution
●
So both read/write scalability
NTT DATA Intellilink Corporation
42Postgres-XC Cluster Management
Sept. 18th, 2013
Postgres-XC Symmetric Cluster
NTT DATA Intellilink Corporation
43Postgres-XC Cluster Management
Sept. 18th, 2013
Scalability
DBT-1 (Rev)
NTT DATA Intellilink Corporation
44Postgres-XC Cluster Management
Sept. 18th, 2013
Architecture and Configuration
NTT DATA Intellilink Corporation
45Postgres-XC Cluster Management
Sept. 18th, 2013
Outline of Components
●
GTM (Global Transaction Manager)
– Distributed MVCC
●
Provide global transaction ID (GXID) to all the transactions
●
Provide global snapshot to all the transactions
– Sequence
●
GTM_Proxy
– Group communications to GTM and reduce amount of GTM network
workload
●
Coordinator
– Handles incoming SQL statements
●
Parse, plan, conduct execution in datanodes and the coordinator.
●
Integrate local results from each datanode involved.
●
Datanode
– Actual data storage
●
Almost vanilla PostgreSQL
Share the
binary
NTT DATA Intellilink Corporation
46Postgres-XC Cluster Management
Sept. 18th, 2013
Flexible Configuration of Comonents
●
Each coordinator/datanode can be configured in any servers,
same or different, as log as
– Each component does not share the following set of resources
●
Listening IP addresses
●
Listening port
●
Work Directories
●
For simplicity and better workload balance, the following is
advised:
– Have separate GTM server
– Each of others should have
●
One GTM proxy (for network workload improvement)
●
One Coordinator
– Some transactions may benefit from data located at local datanode
(preferred node)
●
One Datanode
– Automatic workload balance between coordinator and datanode
NTT DATA Intellilink Corporation
47Postgres-XC Cluster Management
Sept. 18th, 2013
How XC Scales both Read/Write
●
Transaction Tables → Sharding
– Only one write
– Parallel writes in datanodes
●
Master Tables → Replication
– Relatively static: Not significant many-writes overhead
– Local join with transaction tables → Most join operation can
be done locally in datanodes

Más contenido relacionado

La actualidad más candente

Overview of some popular distributed databases
Overview of some popular distributed databasesOverview of some popular distributed databases
Overview of some popular distributed databasessagar chaturvedi
 
Managing terabytes: When Postgres gets big
Managing terabytes: When Postgres gets bigManaging terabytes: When Postgres gets big
Managing terabytes: When Postgres gets bigSelena Deckelmann
 
Red Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-CasesRed Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-CasesRed_Hat_Storage
 
Gluster Storage
Gluster StorageGluster Storage
Gluster StorageRaz Tamir
 
Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015Vijay Bellur
 
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Masao Fujii
 
Glusterfs for sysadmins-justin_clift
Glusterfs for sysadmins-justin_cliftGlusterfs for sysadmins-justin_clift
Glusterfs for sysadmins-justin_cliftGluster.org
 
Erasure codes and storage tiers on gluster
Erasure codes and storage tiers on glusterErasure codes and storage tiers on gluster
Erasure codes and storage tiers on glusterRed_Hat_Storage
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityPythian
 
Red Hat Gluster Storage, Container Storage and CephFS Plans
Red Hat Gluster Storage, Container Storage and CephFS PlansRed Hat Gluster Storage, Container Storage and CephFS Plans
Red Hat Gluster Storage, Container Storage and CephFS PlansRed_Hat_Storage
 
Storage as a Service with Gluster
Storage as a Service with GlusterStorage as a Service with Gluster
Storage as a Service with GlusterVijay Bellur
 
Tiering barcelona
Tiering barcelonaTiering barcelona
Tiering barcelonaGluster.org
 
Red Hat Storage - Introduction to GlusterFS
Red Hat Storage - Introduction to GlusterFSRed Hat Storage - Introduction to GlusterFS
Red Hat Storage - Introduction to GlusterFSGlusterFS
 
Gluster.community.day.2013
Gluster.community.day.2013Gluster.community.day.2013
Gluster.community.day.2013Udo Seidel
 
The Future of GlusterFS and Gluster.org
The Future of GlusterFS and Gluster.orgThe Future of GlusterFS and Gluster.org
The Future of GlusterFS and Gluster.orgJohn Mark Walker
 
Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012Gluster.org
 
Dustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep DiveDustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep DiveGluster.org
 

La actualidad más candente (20)

Overview of some popular distributed databases
Overview of some popular distributed databasesOverview of some popular distributed databases
Overview of some popular distributed databases
 
Managing terabytes: When Postgres gets big
Managing terabytes: When Postgres gets bigManaging terabytes: When Postgres gets big
Managing terabytes: When Postgres gets big
 
Red Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-CasesRed Hat Gluster Storage - Direction, Roadmap and Use-Cases
Red Hat Gluster Storage - Direction, Roadmap and Use-Cases
 
Gluster Data Tiering
Gluster Data TieringGluster Data Tiering
Gluster Data Tiering
 
Gluster Storage
Gluster StorageGluster Storage
Gluster Storage
 
Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015
 
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)
 
Glusterfs for sysadmins-justin_clift
Glusterfs for sysadmins-justin_cliftGlusterfs for sysadmins-justin_clift
Glusterfs for sysadmins-justin_clift
 
Erasure codes and storage tiers on gluster
Erasure codes and storage tiers on glusterErasure codes and storage tiers on gluster
Erasure codes and storage tiers on gluster
 
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous AvailabilityRamp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
Ramp-Tutorial for MYSQL Cluster - Scaling with Continuous Availability
 
Red Hat Gluster Storage, Container Storage and CephFS Plans
Red Hat Gluster Storage, Container Storage and CephFS PlansRed Hat Gluster Storage, Container Storage and CephFS Plans
Red Hat Gluster Storage, Container Storage and CephFS Plans
 
GlusterFS And Big Data
GlusterFS And Big DataGlusterFS And Big Data
GlusterFS And Big Data
 
Storage as a Service with Gluster
Storage as a Service with GlusterStorage as a Service with Gluster
Storage as a Service with Gluster
 
Tiering barcelona
Tiering barcelonaTiering barcelona
Tiering barcelona
 
Red Hat Storage - Introduction to GlusterFS
Red Hat Storage - Introduction to GlusterFSRed Hat Storage - Introduction to GlusterFS
Red Hat Storage - Introduction to GlusterFS
 
Gluster.community.day.2013
Gluster.community.day.2013Gluster.community.day.2013
Gluster.community.day.2013
 
The Future of GlusterFS and Gluster.org
The Future of GlusterFS and Gluster.orgThe Future of GlusterFS and Gluster.org
The Future of GlusterFS and Gluster.org
 
Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012
 
Dustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep DiveDustin Black - Red Hat Storage Server Administration Deep Dive
Dustin Black - Red Hat Storage Server Administration Deep Dive
 
Gluster d2
Gluster d2Gluster d2
Gluster d2
 

Destacado

Pgxc scalability pg_open2012
Pgxc scalability pg_open2012Pgxc scalability pg_open2012
Pgxc scalability pg_open2012Ashutosh Bapat
 
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...PostgresOpen
 
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenKeith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenPostgresOpen
 
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres OpenBruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres OpenPostgresOpen
 
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres OpenPostgresOpen
 
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013PostgresOpen
 
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenDavid Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenPostgresOpen
 
Keith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenKeith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenPostgresOpen
 
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...PostgresOpen
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...PostgresOpen
 
Islamabad PUG - 7th Meetup - performance tuning
Islamabad PUG - 7th Meetup - performance tuningIslamabad PUG - 7th Meetup - performance tuning
Islamabad PUG - 7th Meetup - performance tuningUmair Shahid
 
Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Denish Patel
 
Islamabad PUG - 7th meetup - performance tuning
Islamabad PUG - 7th meetup - performance tuningIslamabad PUG - 7th meetup - performance tuning
Islamabad PUG - 7th meetup - performance tuningUmair Shahid
 
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenRobert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenPostgresOpen
 
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenSteve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenPostgresOpen
 
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenMichael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenPostgresOpen
 
PoPostgreSQL Web Projects: From Start to FinishStart To Finish
PoPostgreSQL Web Projects: From Start to FinishStart To FinishPoPostgreSQL Web Projects: From Start to FinishStart To Finish
PoPostgreSQL Web Projects: From Start to FinishStart To Finishelliando dias
 
Gbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfsGbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfsGiuseppe Broccolo
 
PostgreSQL HA
PostgreSQL   HAPostgreSQL   HA
PostgreSQL HAharoonm
 

Destacado (20)

Pgxc scalability pg_open2012
Pgxc scalability pg_open2012Pgxc scalability pg_open2012
Pgxc scalability pg_open2012
 
An Introduction to Postgresql
An Introduction to PostgresqlAn Introduction to Postgresql
An Introduction to Postgresql
 
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
Gurjeet Singh - How Postgres is Different From (Better Tha) Your RDBMS @ Post...
 
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres OpenKeith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
Keith Fiske - When PostgreSQL Can't, You Can @ Postgres Open
 
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres OpenBruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
Bruce Momjian - Inside PostgreSQL Shared Memory @ Postgres Open
 
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter - PostgreSQL Backup and Recovery Methods @ Postgres Open
 
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
Ryan Jarvinen Open Shift Talk @ Postgres Open 2013
 
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres OpenDavid Keeney - SQL Database Server Requests from the Browser @ Postgres Open
David Keeney - SQL Database Server Requests from the Browser @ Postgres Open
 
Keith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres OpenKeith Paskett - Postgres on ZFS @ Postgres Open
Keith Paskett - Postgres on ZFS @ Postgres Open
 
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
Henrietta Dombrovskaya - A New Approach to Resolve Object-Relational Impedanc...
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
 
Islamabad PUG - 7th Meetup - performance tuning
Islamabad PUG - 7th Meetup - performance tuningIslamabad PUG - 7th Meetup - performance tuning
Islamabad PUG - 7th Meetup - performance tuning
 
Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)Out of the box replication in postgres 9.4(pg confus)
Out of the box replication in postgres 9.4(pg confus)
 
Islamabad PUG - 7th meetup - performance tuning
Islamabad PUG - 7th meetup - performance tuningIslamabad PUG - 7th meetup - performance tuning
Islamabad PUG - 7th meetup - performance tuning
 
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres OpenRobert Haas Query Planning Gone Wrong Presentation @ Postgres Open
Robert Haas Query Planning Gone Wrong Presentation @ Postgres Open
 
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenSteve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
 
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres OpenMichael Bayer Introduction to SQLAlchemy @ Postgres Open
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
 
PoPostgreSQL Web Projects: From Start to FinishStart To Finish
PoPostgreSQL Web Projects: From Start to FinishStart To FinishPoPostgreSQL Web Projects: From Start to FinishStart To Finish
PoPostgreSQL Web Projects: From Start to FinishStart To Finish
 
Gbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfsGbroccolo pgconfeu2016 pgnfs
Gbroccolo pgconfeu2016 pgnfs
 
PostgreSQL HA
PostgreSQL   HAPostgreSQL   HA
PostgreSQL HA
 

Similar a Postgres-XC Dynamic Cluster Management

Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2PgTraining
 
GPGPU Accelerates PostgreSQL ~Unlock the power of multi-thousand cores~
GPGPU Accelerates PostgreSQL ~Unlock the power of multi-thousand cores~GPGPU Accelerates PostgreSQL ~Unlock the power of multi-thousand cores~
GPGPU Accelerates PostgreSQL ~Unlock the power of multi-thousand cores~Kohei KaiGai
 
Deployment of PostgreSQL inside of Kubernetes with High Availability
 Deployment of PostgreSQL inside of Kubernetes with High Availability Deployment of PostgreSQL inside of Kubernetes with High Availability
Deployment of PostgreSQL inside of Kubernetes with High AvailabilityEDB
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer PerspectiveTroubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer PerspectiveMarcelo Altmann
 
HKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyHKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyLinaro
 
What’s new in 9.6, by PostgreSQL contributor
What’s new in 9.6, by PostgreSQL contributorWhat’s new in 9.6, by PostgreSQL contributor
What’s new in 9.6, by PostgreSQL contributorMasahiko Sawada
 
Monitoring with Ganglia
Monitoring with GangliaMonitoring with Ganglia
Monitoring with GangliaFastly
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansibleMukul Malhotra
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyAlexander Kukushkin
 
Greenplum Overview for Postgres Hackers - Greenplum Summit 2018
Greenplum Overview for Postgres Hackers - Greenplum Summit 2018Greenplum Overview for Postgres Hackers - Greenplum Summit 2018
Greenplum Overview for Postgres Hackers - Greenplum Summit 2018VMware Tanzu
 
配置Golden gate同步ddl语句
配置Golden gate同步ddl语句配置Golden gate同步ddl语句
配置Golden gate同步ddl语句maclean liu
 
Building a continuous delivery platform for the biggest spike in e-commerce -...
Building a continuous delivery platform for the biggest spike in e-commerce -...Building a continuous delivery platform for the biggest spike in e-commerce -...
Building a continuous delivery platform for the biggest spike in e-commerce -...Puppet
 
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...NTT DATA Technology & Innovation
 
LAS16-101: Efficient kernel backporting
LAS16-101: Efficient kernel backportingLAS16-101: Efficient kernel backporting
LAS16-101: Efficient kernel backportingLinaro
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterFromDual GmbH
 
Introduction of unit test on android kernel
Introduction of unit test on android kernelIntroduction of unit test on android kernel
Introduction of unit test on android kernelJohnson Chou
 
pgconfasia2016 plcuda en
pgconfasia2016 plcuda enpgconfasia2016 plcuda en
pgconfasia2016 plcuda enKohei KaiGai
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Valerii Kravchuk
 

Similar a Postgres-XC Dynamic Cluster Management (20)

Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2Oracle to Postgres Migration - part 2
Oracle to Postgres Migration - part 2
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
GPGPU Accelerates PostgreSQL ~Unlock the power of multi-thousand cores~
GPGPU Accelerates PostgreSQL ~Unlock the power of multi-thousand cores~GPGPU Accelerates PostgreSQL ~Unlock the power of multi-thousand cores~
GPGPU Accelerates PostgreSQL ~Unlock the power of multi-thousand cores~
 
Deployment of PostgreSQL inside of Kubernetes with High Availability
 Deployment of PostgreSQL inside of Kubernetes with High Availability Deployment of PostgreSQL inside of Kubernetes with High Availability
Deployment of PostgreSQL inside of Kubernetes with High Availability
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer PerspectiveTroubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer Perspective
 
HKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case studyHKG15-409: ARM Hibernation enablement on SoCs - a case study
HKG15-409: ARM Hibernation enablement on SoCs - a case study
 
What’s new in 9.6, by PostgreSQL contributor
What’s new in 9.6, by PostgreSQL contributorWhat’s new in 9.6, by PostgreSQL contributor
What’s new in 9.6, by PostgreSQL contributor
 
Monitoring with Ganglia
Monitoring with GangliaMonitoring with Ganglia
Monitoring with Ganglia
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
Greenplum Overview for Postgres Hackers - Greenplum Summit 2018
Greenplum Overview for Postgres Hackers - Greenplum Summit 2018Greenplum Overview for Postgres Hackers - Greenplum Summit 2018
Greenplum Overview for Postgres Hackers - Greenplum Summit 2018
 
配置Golden gate同步ddl语句
配置Golden gate同步ddl语句配置Golden gate同步ddl语句
配置Golden gate同步ddl语句
 
Building a continuous delivery platform for the biggest spike in e-commerce -...
Building a continuous delivery platform for the biggest spike in e-commerce -...Building a continuous delivery platform for the biggest spike in e-commerce -...
Building a continuous delivery platform for the biggest spike in e-commerce -...
 
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
PostgreSQL on Kubernetes: Realizing High Availability with PGO (Postgres Ibiz...
 
LAS16-101: Efficient kernel backporting
LAS16-101: Efficient kernel backportingLAS16-101: Efficient kernel backporting
LAS16-101: Efficient kernel backporting
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera Cluster
 
Introduction of unit test on android kernel
Introduction of unit test on android kernelIntroduction of unit test on android kernel
Introduction of unit test on android kernel
 
pgconfasia2016 plcuda en
pgconfasia2016 plcuda enpgconfasia2016 plcuda en
pgconfasia2016 plcuda en
 
Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)Gdb basics for my sql db as (percona live europe 2019)
Gdb basics for my sql db as (percona live europe 2019)
 
Linux Kernel Debugging
Linux Kernel DebuggingLinux Kernel Debugging
Linux Kernel Debugging
 

Más de PostgresOpen

Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenCraig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenPostgresOpen
 
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenJohn Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenPostgresOpen
 
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres OpenRobert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres OpenPostgresOpen
 
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenMichael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenPostgresOpen
 
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenPostgresOpen
 
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013PostgresOpen
 

Más de PostgresOpen (6)

Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres OpenCraig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
Craig Kerstiens - Scalable Uniques in Postgres @ Postgres Open
 
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenJohn Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
 
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres OpenRobert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
Robert Bernier - Recovering From A Damaged PostgreSQL Cluster @ Postgres Open
 
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres OpenMichael Paquier - Taking advantage of custom bgworkers @ Postgres Open
Michael Paquier - Taking advantage of custom bgworkers @ Postgres Open
 
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres OpenKevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
Kevin Kempter PostgreSQL Backup and Recovery Methods @ Postgres Open
 
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
Andrew Dunstan 9.3 JSON Presentation @ Postgres Open 2013
 

Último

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Último (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Postgres-XC Dynamic Cluster Management

  • 1. NTT DATA Intellilink Corporation Postgres-XC Dynamic Cluster Management Koichi Suzuki Postgres-XC Development Group Postgres Open 2013 September 17th, 2013 Hotel Sax, Chicago, USA
  • 2. NTT DATA Intellilink Corporation 2Postgres-XC Cluster Management Sept. 18th, 2013 Outline of the Talk ● Postgres-XC short review – Architecture and scalability ● Configurating Postgres-XC – Manual configuration – Dedicated tools ● Operating Postgres-XC ● Postgres-XC node management – Dynamic node addition/removal ● Failure handling and HA ● Current status and future schedule
  • 3. NTT DATA Intellilink Corporation 3Postgres-XC Cluster Management Sept. 18th, 2013 Self Introduction ● Postgres-XC leader and core architect, as well as a core developer – Whole architecture design – Global transaction management and data distribution as a key for write-scalability ● Work for NTT DATA Intellilink – Subsidiary of NTT DATA corporation dedicated for system platform – Member of NTT group company ● Resources – koichi.clarinet@gmail.com (facebook, linkedin) – @koichiclarinet (twitter)
  • 4. Sept. 18th, 2013 Postgres-XC Cluster Management 4 NTT DATA Intellilink Corporation Postgres-XC Short Review
  • 5. NTT DATA Intellilink Corporation 5Postgres-XC Cluster Management Sept. 18th, 2013 Useful Materials ● Postgres-XC – http://postgres-xc.sourceforge.net/ (project web site) – http://sourceforge.net/projects/postgres-xc/ (development site) – http://postgres-xc.sourceforge.net/misc- docs/20120614_PGXC_Tutorial_global.pdf (Postgres-XC tutorial) – http://postgres-xc.sourceforge.net/misc- docs/Prague_Presentation_20121024.pdf (HA architecture and feature) – http://postgresxc.wikia.com/wiki/File:Postgres-XC_20110711_01.pdf (General architecture and feature) ● PostgreSQL resource agents for Pacemaker/Heartbeat – sf-ex : mount filesystem exclusively ● https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/sfex – postgres – streaming replication ● https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/pgsql
  • 6. NTT DATA Intellilink Corporation 6Postgres-XC Cluster Management Sept. 18th, 2013 Postgres-XC in Postgres Open ● 2011 – Postgres-XC inroduction – Architecture, scalability ● 2012 – Postgres-XC internals – SQL planning and execution ● 2013 – Deployment, configuration, operation – Slaves for high-availability – Cluster management
  • 7. NTT DATA Intellilink Corporation 7Postgres-XC Cluster Management Sept. 18th, 2013 Postgres-XC 1.1 ● Dynamic node addition/removal – Related new options to initidb, pg_dump, and pg_dumpall – DDL lock during node addition/removal – Table re-distribution ● Row-level triggers ● RETURNING ● pgxc_ctl operation tool ● Many distributed SQL planner improvements – Outer joins – LIMIT, ORDER BY, GROUP BY pushdown ● Executor improvement – Merge and hash-join at the coordinator – Distributed sort and merge at datanodes ● Others – PostgreSQL 9.2.4 merge – GTM restore point backup
  • 8. Sept. 18th, 2013 Postgres-XC Cluster Management 8 NTT DATA Intellilink Corporation Configuring Postgres-XC
  • 9. NTT DATA Intellilink Corporation 9Postgres-XC Cluster Management Sept. 18th, 2013 Manual Operation ● Configure postgresql.conf for all the components – Coordinator – Datanode ● Configure node configuration by CREATE|ALTER NODE – Has to repeat for all the coordinators ● Could be very painful ● Operation such as Start/Stop/Failover/Add nodes/Remove nodes could be complicated too
  • 10. NTT DATA Intellilink Corporation 11Postgres-XC Cluster Management Sept. 18th, 2013 Overview of pgxc_ctl ● Command line tool ● Takes care of Postgres-XC database cluster operation – Configuration/Initialization – Start/stop – Simple monitoring – Failover – Add/remove components dynamically.
  • 11. NTT DATA Intellilink Corporation 12Postgres-XC Cluster Management Sept. 18th, 2013 Configuration (1) ● Configuration file is a bash-script – Easy to customize – Flexible configuration definitions # pgxcInstallDir variable is needed if you invoke "deploy" command from pgxc_ctl utility. # If don't you don't need this variable. pgxcInstallDir=$HOME/pgxc #---- OVERALL ----------------------------------------------------------------------------- # pgxcOwner=koichi # owner of the Postgres-XC databaseo cluster. Here, we use this # both as linus user and database user. This must be # the super user of each coordinator and datanode. pgxcUser=$pgxcOwner # OS user of Postgres-XC owner tmpDir=/tmp # temporary dir used in XC servers localTmpDir=$tmpDir # temporary dir used here locally configBackup=n # If you want config file backup configBackupHost=yourBackupHost # host to backup config file configBackupDir=yourBackupDir # Backup directory configBackupFile=yourBackupFile # Backup file name --> Need to synchronize when original changed. #---- GTM ------------------------------------------------------------------------------------ #---- Overall ------- gtmName=gtm #---- GTM Master ----------------------------------------------- #---- Overall ---- gtmMasterServer=node13 gtmMasterPort=20001 gtmMasterDir=$HOME/pgxc/nodes/gtm
  • 12. NTT DATA Intellilink Corporation 13Postgres-XC Cluster Management Sept. 18th, 2013 Configuration(2) ● Each component needs – Nodename – Hostname/address – Port – Work Directory – (Coordinator needs additional pooler port) – (Coordinator/Datanode slave needs WAL archive directory) – Specific configuration parameters. ● You can specify these configuration for each component ● Pgxc_ctl will take care of everything else. ● Example will be given later.
  • 13. NTT DATA Intellilink Corporation 14Postgres-XC Cluster Management Sept. 18th, 2013 Demonstration ● Configuration file template – prepare command ● Configuration/Initialization – clean command – init command ● Start/stop – start command – stop command – kill command ● Selecting coordnator automatically – Createdb – Createuser – Dropdb – Psql ● Failover – failover command – reconnect command ● Add/remove components dynamically – Add command – Remove command ● Table re-distribution – ALTER TABLE statement
  • 14. NTT DATA Intellilink Corporation 15Postgres-XC Cluster Management Sept. 18th, 2013 Configuration Specifics ● You should specify – GTM master (mandatory) – GTM slave (optional) – GTM Proxy (optional, needed for HA) – Coordinator master (at least one) – Coordinator slave (optional) – Datanode master (at least one) – Datanode slave (optional)
  • 15. NTT DATA Intellilink Corporation 16Postgres-XC Cluster Management Sept. 18th, 2013 Overall Configuration # pgxcInstallDir variable is needed if you invoke "deploy" command from pgxc_ctl utility. # If don't you don't need this variable. pgxcInstallDir=$HOME/pgxc #---- OVERALL ----------------------------------------------------------------------------- # pgxcOwner=koichi # owner of the Postgres-XC databaseo cluster. Here, we use this # both as linus user and database user. This must be # the super user of each coordinator and datanode. pgxcUser=$pgxcOwner # OS user of Postgres-XC owner tmpDir=/tmp # temporary dir used in XC servers localTmpDir=$tmpDir # temporary dir used here locally configBackup=n # If you want config file backup configBackupHost=yourBackupHost # host to backup config file configBackupDir=yourBackupDir # Backup directory configBackupFile=yourBackupFile # Backup file name --> Need to synchronize when original changed.
  • 16. NTT DATA Intellilink Corporation 17Postgres-XC Cluster Management Sept. 18th, 2013 GTM Master #---- GTM ------------------------------------------------------------------------------------ # GTM is mandatory. You must have at least (and only) one GTM master in your Postgres-XC cluster. # If GTM crashes and you need to reconfigure it, you can do it by pgxc_update_gtm command to update # GTM master with others. Of course, we provide pgxc_remove_gtm command to remove it. This command # will not stop the current GTM. It is up to the operator. #---- Overall ------- gtmName=gtm #---- GTM Master ----------------------------------------------- #---- Overall ---- gtmMasterServer=node13 gtmMasterPort=20001 gtmMasterDir=$HOME/pgxc/nodes/gtm #---- Configuration --- gtmExtraConfig=none # Will be added gtm.conf for both Master and Slave (done at initilization only) gtmMasterSpecificExtraConfig=none # Will be added to Master's gtm.conf (done at initialization only)
  • 17. NTT DATA Intellilink Corporation 18Postgres-XC Cluster Management Sept. 18th, 2013 GTM Slave #---- GTM Slave ----------------------------------------------- # Because GTM is a key component to maintain database consistency, you may want to configure GTM slave # for backup. #---- Overall ------ gtmSlave=y # Specify y if you configure GTM Slave. Otherwise, GTM slave will not be configured and # all the following variables will be reset. gtmSlaveServer=node12 # value none means GTM slave is not available. # Give none if you don't configure GTM Slave. GtmSlavePort=20001 # Not used if you don't configure GTM slave. gtmSlaveDir=$HOME/pgxc/nodes/gtm # Not used if you don't configure GTM slave. # Please note that when you have GTM failover, then there will be no slave available until you configure the slave # again. (pgxc_add_gtm_slave function will handle it) #---- Configuration ---- gtmSlaveSpecificExtraConfig=none # Will be added to Slave's gtm.conf (done at initialization only)
  • 18. NTT DATA Intellilink Corporation 19Postgres-XC Cluster Management Sept. 18th, 2013 GTM Proxy #---- GTM Proxy ------------------------------------------------------------------------------------------------------- # GTM proxy will be selected based upon which server each component runs on. # When fails over to the slave, the slave inherits its master's gtm proxy. It should be # reconfigured based upon the new location. # # To do so, slave should be restarted. So pg_ctl promote -> (edit postgresql.conf and recovery.conf) -> pg_ctl restart # # You don't have to configure GTM Proxy if you dont' configure GTM slave or you are happy if every component connects # to GTM Master directly. If you configure GTL slave, you must configure GTM proxy too. #---- Shortcuts ------ gtmProxyDir=$HOME/pgxc/nodes/gtm_pxy #---- Overall ------- gtmProxy=y # Specify y if you conifugre at least one GTM proxy. You may not configure gtm proxies # only when you dont' configure GTM slaves. # If you specify this value not to y, the following parameters will be set to default empty values. # If we find there're no valid Proxy server names (means, every servers are specified # as none), then gtmProxy value will be set to "n" and all the entries will be set to # empty values. gtmProxyNames=(gtm_pxy1 gtm_pxy2 gtm_pxy3 gtm_pxy4) # No used if it is not configured gtmProxyServers=(node06 node07 node08 node09) # Specify none if you dont' configure it. gtmProxyPorts=(20001 20001 20001 20001) # Not used if it is not configured. gtmProxyDirs=($gtmProxyDir $gtmProxyDir $gtmProxyDir $gtmProxyDir) # Not used if it is not configured. #---- Configuration ---- gtmPxyExtraConfig=none # Extra configuration parameter for gtm_proxy gtmPxySpecificExtraConfig=(none none none none)
  • 19. NTT DATA Intellilink Corporation 20Postgres-XC Cluster Management Sept. 18th, 2013 Coordinator Common #---- Coordinators ---------------------------------------------------------------------------------------------------- #---- shortcuts ---------- coordMasterDir=$HOME/pgxc/nodes/coord coordSlaveDir=$HOME/pgxc/nodes/coord_slave coordArchLogDir=$HOME/pgxc/nodes/coord_archlog #---- Overall ------------ coordNames=(coord1 coord2 coord3 coord4) # Master and slave use the same name coordPorts=(20004 20005 20004 20005) # Master and slave use the same port poolerPorts=(20010 20011 20010 20011) # Master and slave use the same pooler port coordPgHbaEntries=(192.168.1.0/24) # Assumes that all the coordinator (master/slave) accepts # the same connection # This entry allows only $pgxcOwner to connect. # If you'd like to setup another connection, you should # supply these entries through files specified below. # Note: The above parameter is extracted as "host all all 0.0.0.0/0 trust". If you don't want # such setups, specify the value () to this variable and suplly what you want using coordExtraPgHba # and/or coordSpecificExtraPgHba variables.
  • 20. NTT DATA Intellilink Corporation 21Postgres-XC Cluster Management Sept. 18th, 2013 Coordinator Master #---- Master ------------- coordMasterServers=(node06 node07 node08 node09) # none means this master is not available coordMasterDirs=($coordMasterDir $coordMasterDir $coordMasterDir $coordMasterDir) CoordMaxWALsernder=5 # max_wal_senders: needed to configure slave. If zero value is specified, # it is expected to supply this parameter explicitly by external files # specified in the following. If you don't configure slaves, leave this value to zero. coordMaxWALSenders=($coordMaxWALsernder $coordMaxWALsernder $coordMaxWALsernder $coordMaxWALsernder) # max_wal_senders configuration for each coordinator.
  • 21. NTT DATA Intellilink Corporation 22Postgres-XC Cluster Management Sept. 18th, 2013 Coordinator Slave #---- Slave ------------- coordSlave=y # Specify y if you configure at least one coordiantor slave. Otherwise, the following # configuration parameters will be set to empty values. # If no effective server names are found (that is, every servers are specified as none), # then coordSlave value will be set to n and all the following values will be set to # empty values. coordSlaveSync=y # Specify to connect with synchronized mode. At present, only “y” is assumed. coordSlaveServers=(node07 node08 node09 node06) # none means this slave is not available coordSlaveDirs=($coordSlaveDir $coordSlaveDir $coordSlaveDir $coordSlaveDir) coordArchLogDirs=($coordArchLogDir $coordArchLogDir $coordArchLogDir $coordArchLogDir)
  • 22. NTT DATA Intellilink Corporation 23Postgres-XC Cluster Management Sept. 18th, 2013 Coordinator Extra Configuration #---- Configuration files--- # Need these when you'd like setup specific non-default configuration # These files will go to corresponding files for the master. # You may supply your bash script to setup extra config lines and extra pg_hba.conf entries # Or you may supply these files manually. coordExtraConfig=coordExtraConfig # Extra configuration file for coordinators. # This file will be added to all the coordinators' # postgresql.conf # Pleae note that the following sets up minimum parameters which you may want to change. # You can put your postgresql.conf lines here. cat > $coordExtraConfig <<EOF #================================================ # Added to all the coordinator postgresql.conf # Original: $coordExtraConfig log_destination = 'stderr' logging_collector = on log_directory = 'pg_log' listen_addresses = '*' max_connections = 100 EOF
  • 23. NTT DATA Intellilink Corporation 24Postgres-XC Cluster Management Sept. 18th, 2013 Datanode Common #---- Datanodes ------------------------------------------------------------------------------------------------------- #---- Shortcuts -------------- datanodeMasterDir=$HOME/pgxc/nodes/dn_master datanodeSlaveDir=$HOME/pgxc/nodes/dn_slave datanodeArchLogDir=$HOME/pgxc/nodes/datanode_archlog #---- Overall --------------- # At present, xc has a priblem to issue ALTER NODE against the primay node. Until it is fixed, the test will be done # without this feature. primaryDatanode=datanode1 # Primary Node. datanodeNames=(datanode1 datanode2 datanode3 datanode4) datanodePorts=(20008 20009 20008 20009) # Master and slave use the same port! datanodePgHbaEntries=(192.168.1.0/24) # Assumes that all the coordinator (master/slave) accepts # the same connection # This list sets up pg_hba.conf for $pgxcOwner user. # If you'd like to setup other entries, supply them # through extra configuration files specified below. # Note: The above parameter is extracted as "host all all 0.0.0.0/0 trust". If you don't want # such setups, specify the value () to this variable and suplly what you want using datanodeExtraPgHba # and/or datanodeSpecificExtraPgHba variables.
  • 24. NTT DATA Intellilink Corporation 25Postgres-XC Cluster Management Sept. 18th, 2013 Datanode Master #---- Master ---------------- datanodeMasterServers=(node06 node07 node08 node09) # none means this master is not available. # This means that there should be the master but is down. # The cluster is not operational until the master is # recovered and ready to run. datanodeMasterDirs=($datanodeMasterDir $datanodeMasterDir $datanodeMasterDir $datanodeMasterDir) datanodeMaxWalSender=5 # max_wal_senders: needed to configure slave. If zero value is # specified, it is expected this parameter is explicitly supplied # by external configuration files. # If you don't configure slaves, leave this value zero. datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender $datanodeMaxWalSender $datanodeMaxWalSender) # max_wal_senders configuration for each datanode
  • 25. NTT DATA Intellilink Corporation 26Postgres-XC Cluster Management Sept. 18th, 2013 Datanode Slave #---- Slave ----------------- datanodeSlave=y # Specify y if you configure at least one coordiantor slave. Otherwise, the following # configuration parameters will be set to empty values. # If no effective server names are found (that is, every servers are specified as none), # then datanodeSlave value will be set to n and all the following values will be set to # empty values. datanodeSlaveServers=(node07 node08 node09 node06) # value none means this slave is not available datanodeSlaveSync=y # If datanode slave is connected in synchronized mode datanodeSlaveDirs=($datanodeSlaveDir $datanodeSlaveDir $datanodeSlaveDir $datanodeSlaveDir) datanodeArchLogDirs=( $datanodeArchLogDir $datanodeArchLogDir $datanodeArchLogDir $datanodeArchLogDir )
  • 26. NTT DATA Intellilink Corporation 27Postgres-XC Cluster Management Sept. 18th, 2013 Datanode Additional Configuration # ---- Configuration files --- # You may supply your bash script to setup extra config lines and extra pg_hba.conf entries here. # These files will go to corresponding files for the master. # Or you may supply these files manually. datanodeExtraConfig=none # Extra configuration file for datanodes. This file will be added to all the # datanodes' postgresql.conf datanodeSpecificExtraConfig=(none none none none) datanodeExtraPgHba=none # Extra entry for pg_hba.conf. This file will be added to all the #datanodes' postgresql.conf datanodeSpecificExtraPgHba=(none none none none)
  • 27. NTT DATA Intellilink Corporation 28Postgres-XC Cluster Management Sept. 18th, 2013 When configuration changes #=================================================== # pgxc configuration file updated due to GTM failover # 20130704_16:56:42 gtmMasterServer=node12 gtmMasterPort=20001 gtmMasterDir=/home/koichi/pgxc/nodes/gtm gtmSlave=n gtmSlaveServer=none gtmSlavePort=0 gtmSlaveDir=none #----End of reconfiguration ------------------------- ● Failover by components failure ● Add/remove componentsc ● Configuration file is modified. ● Backed up if configured so.
  • 28. Sept. 18th, 2013 Postgres-XC Cluster Management 29 NTT DATA Intellilink Corporation SPOF Analysis
  • 29. NTT DATA Intellilink Corporation 30Postgres-XC Cluster Management Sept. 18th, 2013 Postgres-XC Single Point of Failure ● GTM – Obviously SPOF ● GTM-Proxy – No persistent data hold – Just restart when fail ● Coordinator – Every coordinator is essentially a copy – When fails, other coordinators work ● Datanode – SPOF for sharded table
  • 30. NTT DATA Intellilink Corporation 31Postgres-XC Cluster Management Sept. 18th, 2013 Backup for SPOF component ● GTM – Specific backup for GTM (GTM Standby) ● Most information are kept on-memory – Open TXNs ● Only the next GXID is needed to restart whole cluster, kept on disk. ● Copies every internal status change to the backup – Similar to the log shipping in PostgreSQL ● Can promote to the master – GTM-Proxy help this failover ● Datanode – Need backup – Can use PostgreSQL's means ● Log Shipping ● Shared disk ● Coordinator – Not critical but may want to have backups – Can use similar means as Datanodes.
  • 31. NTT DATA Intellilink Corporation 32Postgres-XC Cluster Management Sept. 18th, 2013 GTM Slave (GTM Standby) ● Same binary to GTM – Backs up everything on the fly. – Can promote to the master (gtm_ctl promote) – Configure using gtm.conf ● startup = ACT|STANDBY ● active_host = 'active_gtm_host' ● active_port = 8765 GTM ProxyCoordinator Datanode GTM Master GTM Slave Recocnnect at failure Recocnnect at failure Backup status change
  • 32. NTT DATA Intellilink Corporation 33Postgres-XC Cluster Management Sept. 18th, 2013 Datanodes ● Almost all the techniques for PostgreSQL backup/failover are available – Streaming replication – Shared disk re-mount ● Subject to coordinators – Coordinators should reconfigure failed datanode at failover – Coordinators should clean connections to failed datanode before reconfiguration ● GTM – Reconnect to (new) local GTM proxy
  • 33. NTT DATA Intellilink Corporation 34Postgres-XC Cluster Management Sept. 18th, 2013 Coordinators ● Only catalog is stored – Very stable and static – All the coordinators are essentially the same copy ● Datanode HA technique can be applied – Streaming replication – Shared disk remount ● One more option at a failure – No failover – Remaining coordinators will take care of TXNs – Failed coordinator can be restored offline ● Backup/restore ● Copy catalogue from a remaining coordinator
  • 34. NTT DATA Intellilink Corporation 35Postgres-XC Cluster Management Sept. 18th, 2013 XC vs. O*R* Feature Postgres-XC O____ R__ Background Databsae PostgreSQL O_____ Architecture Shared Nothing Shared Everything Number of Servers Experience: 10 Maybe 20 or more ?? (Most deployments are two server configuration) Hardware Requirement None Shared Disk Read Scale Yes Yes Write Scale Yes Depends (Application level partitioning) Storage Failure Limited impact Component failover Cluster keeps running Whole cluster fails Cluster-wide failover Server Failure Affected components needs failover Others keep running Remaining servers continues service
  • 35. Sept. 18th, 2013 Postgres-XC Cluster Management 36 NTT DATA Intellilink Corporation What's Next?
  • 36. NTT DATA Intellilink Corporation 37Postgres-XC Cluster Management Sept. 18th, 2013 Current and Future Roadmap (1) ● V1.1 (July 2013) – Dynamic component addition/removal – Table redistribution – Trigger – Returning – Cursor – Planner improvement – PostgreSQL 9.2.4 merge – Many others … ● V1.2 (Dec. 2013) – More robust JDBC – Planner improvement – PostgreSQL 9.3 merge – GUI and HA tools (external project)
  • 37. NTT DATA Intellilink Corporation 38Postgres-XC Cluster Management Sept. 18th, 2013 Current and Future Roadmap (2) ● V1.3 or later … – Concurrent Table Redistribution – Flexible function pushdown – Coordinator/Datanode integration – Single XC node as a standalone database – Savepoint – Repeatable read/SSI – GTM Proxy as a coordinator backend – Continue to merge with upcoming PostgreSQL – Many more ...
  • 38. Sept. 18th, 2013 Postgres-XC Cluster Management 39 Copyright © 2011 NTT DATA Corporation NTT DATA Intellilink Corporation Thank you very much!!
  • 39. Sept. 18th, 2013 Postgres-XC Cluster Management 40 NTT DATA Intellilink Corporation Postgres-XC Short Review
  • 40. NTT DATA Intellilink Corporation 41Postgres-XC Cluster Management Sept. 18th, 2013 What is Postgres-XC ● Symmetric PostgerSQL cluster – No master/slave replication – No read-only clusters – Every node can issue both read/write – Every node provides single consistent database view – Transparent transaction management ● Not just a replication – Each table can be replicated/distributed by sharding – Parallel transaction/query execution ● So both read/write scalability
  • 41. NTT DATA Intellilink Corporation 42Postgres-XC Cluster Management Sept. 18th, 2013 Postgres-XC Symmetric Cluster
  • 42. NTT DATA Intellilink Corporation 43Postgres-XC Cluster Management Sept. 18th, 2013 Scalability DBT-1 (Rev)
  • 43. NTT DATA Intellilink Corporation 44Postgres-XC Cluster Management Sept. 18th, 2013 Architecture and Configuration
  • 44. NTT DATA Intellilink Corporation 45Postgres-XC Cluster Management Sept. 18th, 2013 Outline of Components ● GTM (Global Transaction Manager) – Distributed MVCC ● Provide global transaction ID (GXID) to all the transactions ● Provide global snapshot to all the transactions – Sequence ● GTM_Proxy – Group communications to GTM and reduce amount of GTM network workload ● Coordinator – Handles incoming SQL statements ● Parse, plan, conduct execution in datanodes and the coordinator. ● Integrate local results from each datanode involved. ● Datanode – Actual data storage ● Almost vanilla PostgreSQL Share the binary
  • 45. NTT DATA Intellilink Corporation 46Postgres-XC Cluster Management Sept. 18th, 2013 Flexible Configuration of Comonents ● Each coordinator/datanode can be configured in any servers, same or different, as log as – Each component does not share the following set of resources ● Listening IP addresses ● Listening port ● Work Directories ● For simplicity and better workload balance, the following is advised: – Have separate GTM server – Each of others should have ● One GTM proxy (for network workload improvement) ● One Coordinator – Some transactions may benefit from data located at local datanode (preferred node) ● One Datanode – Automatic workload balance between coordinator and datanode
  • 46. NTT DATA Intellilink Corporation 47Postgres-XC Cluster Management Sept. 18th, 2013 How XC Scales both Read/Write ● Transaction Tables → Sharding – Only one write – Parallel writes in datanodes ● Master Tables → Replication – Relatively static: Not significant many-writes overhead – Local join with transaction tables → Most join operation can be done locally in datanodes