SlideShare a Scribd company logo
1 of 41
Download to read offline
Slony-I Replication for
Asynchronous
PostgreSQL
                     Slony-I on Microsoft Windows

                                    Dave Page




 28th October 2005        Dave Page - Magnus Hagander - Andreas Pflug   1
Slony-I


      Asynchronous Replication for PostgreSQL

      Developed by Jan Wieck of Afilias

      Now a community project




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   2
Uses

      Load balancing

      Redundancy/Failover

      Remote/distributed servers

      Upgrades

28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   3
Architecture




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   4
Flexible Topology




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   5
Object types


      Data

      Sequence values

      Schema changes



28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   6
Porting team

      Hiroshi Saito
             pgAdmin, psqlODBC, Npgsql, pgInstaller

      Dave Page
            pgAdmin, PostgreSQL, psqlODBC, pgInstaller, Npgsql, pgWeb

      Magnus Hagander
            PostgreSQL Server, pgInstaller, pgWeb

      Andreas Pflug
            pgAdmin, PostgreSQL Server


28th October 2005       Dave Page - Magnus Hagander - Andreas Pflug   7
Hiroshi



      Provided the initial ‘quick n dirty’ port.

      Organised the project




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   8
Dave

      ‘Ducttape’ test suite

      New regression test suite

      Build system/Makefiles

      Patch/CVS management

28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   9
Magnus

      Code port

            slonik – based on Hiroshi’s work

            slon
                    Reuse pgpipe from PostgreSQL
                    Service control code
                    Event logging


28th October 2005          Dave Page - Magnus Hagander - Andreas Pflug   10
Andreas




      GUI Management using pgAdmin




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   11
Slony-I Replication for
Asynchronous
PostgreSQL
                      Porting Slony-I

                       Magnus Hagander




 28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   12
Porting overview

      The bad
            Designed for Unix
            Relied on Unix tools and architecture
      The good
            Portable between Unixes
            Based on PostgreSQL build system




28th October 2005    Dave Page - Magnus Hagander - Andreas Pflug   13
Porting Slonik - easy

      No shell utils available
            Slonik 1.1 uses SED
            Hiroshi already fixed
      Path issues
            Find the ”share” directory
            Windows compatible paths




28th October 2005    Dave Page - Magnus Hagander - Andreas Pflug   14
Porting Slon - easy

      Pthreads
            Find library to link with
      Winsock
            Simple initialization issue
      Pipes
            Steal from PostgreSQL
      Signals
            Ignore!

28th October 2005     Dave Page - Magnus Hagander - Andreas Pflug   15
Porting slon – a bit more work

      Eventlog integration
            Centralised logging already
            Eventlog when service, stdout when
            console
            Create message library
      Versioning metadata
            Steal most from PostgreSQL
            Decimal version number in config.h

28th October 2005    Dave Page - Magnus Hagander - Andreas Pflug   16
Porting slon – most work

      fork()
      Service integration
      Two problems, one solution




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   17
Slon – Unix architecture

                                       init

              rc.slony                                        rc.xyz


     slon watchdog                                 slon watchdog
                    fork()                                            fork()

         slon engine                                   slon engine

28th October 2005       Dave Page - Magnus Hagander - Andreas Pflug            18
Slon – Windows architecture

                    Service Control Manager
                              init

              rc.slony                                         rc.xyz


     slon slon win32 service handler
          watchdog        slon watchdog
                      fork()
                      CreateProcess()                                  CreateProcess()
                                                                       fork()

         slon engine                                    slon engine

28th October 2005        Dave Page - Magnus Hagander - Andreas Pflug                     19
Porting – end result

      Slon runs on the commandline
            Only for testing/debugging!
      Single service, multiple engines
            One config file per engine
            Paths stored in registry, add/remove with
            slon commandline
      Multiple services, multiple engines
            Different versions of slon

28th October 2005     Dave Page - Magnus Hagander - Andreas Pflug   20
Simple slony replication




                         DEMO


28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   21
Base table creation
  db1
  CREATE TABLE t (
      name text NOT NULL PRIMARY KEY)
  INSERT INTO t VALUES (’Dave’)
  INSERT INTO t VALUES (’Magnus’)

  db2
  CREATE TABLE t (
      name text NOT NULL PRIMARY KEY)




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   22
Installing Slony
  slon       –regservice
  slon       –addengine c:slonydb1.conf
  slon       –addengine c:slonydb2.conf
  slon       -listengines

  db1.conf
  log_level=1
  log_timestamp=false
  cluster_name='test'
  conn_info='host=127.0.0.1 user=postgres
      dbname=db1'


28th October 2005    Dave Page - Magnus Hagander - Andreas Pflug   23
Slon setup script
  # Create slony cluster
  cluster name = test;
  node 1 admin conninfo = ’host=127.0.0.1
      user=postgres database=db1’;
  node 2 admin conninfo = ’host=127.0.0.1
      user=postgres database=db2’;
  init cluster (id=1, comment=’Node 1’)
  # Create set of tables with one table
  create set (id=1, origin=1)
  set add table (set id=1, origin=1, id=1, fully
      qualified name = ’public.t’)


28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   24
Slon setup script (contd)
  # Create node for second engine
  store node (id=2, comment=’Node 2’);
  # Create paths between the two nodes
  store path (server=1,client=2,
      conninfo=’host=127.0.0.1 user=postgres
      dbname=db1’);
  store path (server=2,client=1,
      conninfo=’host=127.0.0.1 user=postgres
      dbname=db2’);
  store listen (origin=1, provider=1, receiver=2);
  store listen (origin=2, provider=2, receiver=1);

  # Subscribe the slave
  subscribe set (id=1, provider=1, receiver=2,
      forward=no)


28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   25
Slony-I Replication for
Asynchronous
PostgreSQL
           Graphical management of Slony-I

                           Andreas Pflug




 28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   26
pgAdmin III architecture

      C++
      wxWidgets 2.6
      Native libpq PostgreSQL connection
      Native Windows and GTK2 look and feel
      For PostgreSQL 7.3 and above
      Some helper programs and modules



28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   27
Slony-I installation: modules

      Performed by Windows installer
      Performed by make;make install from
      source
      Use identical Slony-I versions on all
      servers!
      PostgreSQL servers may have different
      versions and run on different operating
      systems

28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   28
Slony-I installation: Create cluster

      First node in cluster
      Node: database with
      installed cluster and
      running slon process
      Uses Slony-I creation
      scripts
      See pgAdmin's slony
      path option


28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   29
Slony-I installation: Join cluster

      Create node and
      copy replication
      configuration from
      existing node
      Installs software in
      current database
      from existing cluster




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   30
Slony-I installation: paths

      Path: describes how
      a slon process
      connects to other
      nodes
      Libpq connect string




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   31
Slony-I installation: listens

      Listen: instructs a
      node to poll events
      from other nodes




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   32
Slony-I cluster status

      See node statistics




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   33
Slony-I replication sets

      Set: collection of
      tables and sequences
      All table and
      sequence data
      originating on one
      node




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   34
Slony-I Tables

      Table needs unique
      index, PK preferred
      pgAdmin doesn‘t
      offer tables without
      unique index
      Select triggers on
      the table that Slony-I
      should disable on
      slave nodes

28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   35
Slony-I subscriptions

      Table and sequences
      must be present in
      slave node before
      subscribing!
      Subscribed sets can‘t
      be modified; use
      merge set instead.




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   36
Slony-I DDL script replication

      Use replication to
      execute changes to
      subscribed tables to
      insure master and
      slave have identical
      definitions
      May replicate any
      DDL script



28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   37
Slony-I switch over

      Gracefully exchange master and slave
      role to a set between two nodes
      Both nodes must be fully functional
      Function "move set"




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   38
Slony-I fail over

      Master node has failed
      Failover tries to restore as much data
      from slave nodes as possible
      Designate a new master out of the
      previous slaves
      Not yet supported in pgAdmin III V1.4



28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   39
pgAdmin future

      Coming in V1.6:
            Slony-I failover support
            Set creation wizard
            Health analysis improvements




28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   40
Slony-I and pgAdmin Conclusion

      Most Slony-I functions accessible
      through easy-to-use GUI
      At-a-glance view on cluster health
      Integrated with other administrative tasks

  PostgreSQL has integrated replication!



28th October 2005   Dave Page - Magnus Hagander - Andreas Pflug   41

More Related Content

What's hot

Evolve your toolchains dev/ops with OpenStack
Evolve your toolchains dev/ops with OpenStackEvolve your toolchains dev/ops with OpenStack
Evolve your toolchains dev/ops with OpenStackRyan Richard
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction TutorialThomas Rausch
 
Advanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesAdvanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesBrent Laster
 
Ch12 file system implementation
Ch12 file system implementationCh12 file system implementation
Ch12 file system implementationSyaiful Ahdan
 
Operating System : Ch11 file system implementation
Operating System : Ch11 file system implementationOperating System : Ch11 file system implementation
Operating System : Ch11 file system implementationSyaiful Ahdan
 
Effective Linux Development Using PetaLinux Tools 2017.4
Effective Linux Development Using PetaLinux Tools 2017.4Effective Linux Development Using PetaLinux Tools 2017.4
Effective Linux Development Using PetaLinux Tools 2017.4Zach Pfeffer
 
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話katsuya kawabe
 
Docker with OpenStack
Docker with OpenStack Docker with OpenStack
Docker with OpenStack chmouel
 
EclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenEclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenmsohn
 
Kolla Project Update (Vancouver 2018)
Kolla Project Update (Vancouver 2018)Kolla Project Update (Vancouver 2018)
Kolla Project Update (Vancouver 2018)Paul Bourke
 
2018 10-31 modern-http_routing-lisa18
2018 10-31 modern-http_routing-lisa182018 10-31 modern-http_routing-lisa18
2018 10-31 modern-http_routing-lisa18Sandor Szuecs
 
Slack Bot: upload NUGET package to Artifactory
Slack Bot: upload NUGET package to ArtifactorySlack Bot: upload NUGET package to Artifactory
Slack Bot: upload NUGET package to ArtifactorySergey Dzyuban
 
Kolla Onboarding (Vancouver 2018)
Kolla Onboarding (Vancouver 2018)Kolla Onboarding (Vancouver 2018)
Kolla Onboarding (Vancouver 2018)Paul Bourke
 
How we scaled git lab for a 30k employee company
How we scaled git lab for a 30k employee companyHow we scaled git lab for a 30k employee company
How we scaled git lab for a 30k employee companyMinqi Pan
 
Hacking Git and GitHub
Hacking Git and GitHubHacking Git and GitHub
Hacking Git and GitHubEdureka!
 
Git talk from Open 2011 conference in Israel
Git talk from Open 2011 conference in IsraelGit talk from Open 2011 conference in Israel
Git talk from Open 2011 conference in IsraelReuven Lerner
 
Embedded recipes 2018 - End-to-end software production for embedded - Guy Lun...
Embedded recipes 2018 - End-to-end software production for embedded - Guy Lun...Embedded recipes 2018 - End-to-end software production for embedded - Guy Lun...
Embedded recipes 2018 - End-to-end software production for embedded - Guy Lun...Anne Nicolas
 

What's hot (20)

Introduction to Tekton
Introduction to TektonIntroduction to Tekton
Introduction to Tekton
 
Evolve your toolchains dev/ops with OpenStack
Evolve your toolchains dev/ops with OpenStackEvolve your toolchains dev/ops with OpenStack
Evolve your toolchains dev/ops with OpenStack
 
Git Real
Git RealGit Real
Git Real
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
Advanced Git: Functionality and Features
Advanced Git: Functionality and FeaturesAdvanced Git: Functionality and Features
Advanced Git: Functionality and Features
 
Ch12 file system implementation
Ch12 file system implementationCh12 file system implementation
Ch12 file system implementation
 
Operating System : Ch11 file system implementation
Operating System : Ch11 file system implementationOperating System : Ch11 file system implementation
Operating System : Ch11 file system implementation
 
Effective Linux Development Using PetaLinux Tools 2017.4
Effective Linux Development Using PetaLinux Tools 2017.4Effective Linux Development Using PetaLinux Tools 2017.4
Effective Linux Development Using PetaLinux Tools 2017.4
 
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
 
Docker with OpenStack
Docker with OpenStack Docker with OpenStack
Docker with OpenStack
 
EclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heavenEclipseCon 2010 talk: Towards contributors heaven
EclipseCon 2010 talk: Towards contributors heaven
 
Kolla Project Update (Vancouver 2018)
Kolla Project Update (Vancouver 2018)Kolla Project Update (Vancouver 2018)
Kolla Project Update (Vancouver 2018)
 
2018 10-31 modern-http_routing-lisa18
2018 10-31 modern-http_routing-lisa182018 10-31 modern-http_routing-lisa18
2018 10-31 modern-http_routing-lisa18
 
Slack Bot: upload NUGET package to Artifactory
Slack Bot: upload NUGET package to ArtifactorySlack Bot: upload NUGET package to Artifactory
Slack Bot: upload NUGET package to Artifactory
 
Kolla Onboarding (Vancouver 2018)
Kolla Onboarding (Vancouver 2018)Kolla Onboarding (Vancouver 2018)
Kolla Onboarding (Vancouver 2018)
 
Osrs
OsrsOsrs
Osrs
 
How we scaled git lab for a 30k employee company
How we scaled git lab for a 30k employee companyHow we scaled git lab for a 30k employee company
How we scaled git lab for a 30k employee company
 
Hacking Git and GitHub
Hacking Git and GitHubHacking Git and GitHub
Hacking Git and GitHub
 
Git talk from Open 2011 conference in Israel
Git talk from Open 2011 conference in IsraelGit talk from Open 2011 conference in Israel
Git talk from Open 2011 conference in Israel
 
Embedded recipes 2018 - End-to-end software production for embedded - Guy Lun...
Embedded recipes 2018 - End-to-end software production for embedded - Guy Lun...Embedded recipes 2018 - End-to-end software production for embedded - Guy Lun...
Embedded recipes 2018 - End-to-end software production for embedded - Guy Lun...
 

Similar to Slony-I Replication for Asynchronous PostgreSQL Using pgAdmin

Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Osama Mustafa
 
Flintrock: A Faster, Better spark-ec2 by Nicholas Chammas
Flintrock: A Faster, Better spark-ec2 by Nicholas ChammasFlintrock: A Faster, Better spark-ec2 by Nicholas Chammas
Flintrock: A Faster, Better spark-ec2 by Nicholas ChammasSpark Summit
 
Trivadis TechEvent 2017 With the CLI through the Oracle Cloud Martin Berger
Trivadis TechEvent 2017 With the CLI through the Oracle Cloud Martin BergerTrivadis TechEvent 2017 With the CLI through the Oracle Cloud Martin Berger
Trivadis TechEvent 2017 With the CLI through the Oracle Cloud Martin BergerTrivadis
 
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander KukushkinPGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander KukushkinEqunix Business Solutions
 
Embedded Development on ESP32 - FEKT VUT - UREL
Embedded Development on ESP32 - FEKT VUT - URELEmbedded Development on ESP32 - FEKT VUT - UREL
Embedded Development on ESP32 - FEKT VUT - URELJuraj Michálek
 
Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...Jeremy Eder
 
Lessons learned with kubernetes in production at PlayPass
Lessons learned with kubernetes in productionat PlayPassLessons learned with kubernetes in productionat PlayPass
Lessons learned with kubernetes in production at PlayPassPeter Vandenabeele
 
Log management with Graylog2 - FrOSCon 2012
Log management with Graylog2 - FrOSCon 2012Log management with Graylog2 - FrOSCon 2012
Log management with Graylog2 - FrOSCon 2012lennartkoopmann
 
Leiningen2 - humane build management for clojure
Leiningen2 - humane build management for clojureLeiningen2 - humane build management for clojure
Leiningen2 - humane build management for clojureJohn Stevenson
 
2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.comMathieu Buffenoir
 
A gentle intro to Golang and the Go-universe
A gentle intro to Golang and the Go-universeA gentle intro to Golang and the Go-universe
A gentle intro to Golang and the Go-universeAlex-P. Natsios
 
OSC-Fall-Tokyo-2012-v9.pdf
OSC-Fall-Tokyo-2012-v9.pdfOSC-Fall-Tokyo-2012-v9.pdf
OSC-Fall-Tokyo-2012-v9.pdfnitinscribd
 
InfluxCloudi craft container orchestrator
InfluxCloudi craft container orchestratorInfluxCloudi craft container orchestrator
InfluxCloudi craft container orchestratorGianluca Arbezzano
 
Embedded Rust on ESP2 - Rust Linz
Embedded Rust on ESP2 - Rust LinzEmbedded Rust on ESP2 - Rust Linz
Embedded Rust on ESP2 - Rust LinzJuraj Michálek
 
BDM32: AdamCloud Project - Part II
BDM32: AdamCloud Project - Part IIBDM32: AdamCloud Project - Part II
BDM32: AdamCloud Project - Part IIDavid Lauzon
 
Adrian Mouat - Docker Tips and Tricks
 Adrian Mouat - Docker Tips and Tricks Adrian Mouat - Docker Tips and Tricks
Adrian Mouat - Docker Tips and TricksKevin Cross
 
Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Nils Adermann
 
SPFx Team based Development using Docker
SPFx Team based Development using DockerSPFx Team based Development using Docker
SPFx Team based Development using DockerJenkins NS
 

Similar to Slony-I Replication for Asynchronous PostgreSQL Using pgAdmin (20)

Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
 
Flintrock: A Faster, Better spark-ec2 by Nicholas Chammas
Flintrock: A Faster, Better spark-ec2 by Nicholas ChammasFlintrock: A Faster, Better spark-ec2 by Nicholas Chammas
Flintrock: A Faster, Better spark-ec2 by Nicholas Chammas
 
Trivadis TechEvent 2017 With the CLI through the Oracle Cloud Martin Berger
Trivadis TechEvent 2017 With the CLI through the Oracle Cloud Martin BergerTrivadis TechEvent 2017 With the CLI through the Oracle Cloud Martin Berger
Trivadis TechEvent 2017 With the CLI through the Oracle Cloud Martin Berger
 
App container rkt
App container rktApp container rkt
App container rkt
 
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander KukushkinPGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
PGConf.ASIA 2019 Bali - PostgreSQL on K8S at Zalando - Alexander Kukushkin
 
Embedded Development on ESP32 - FEKT VUT - UREL
Embedded Development on ESP32 - FEKT VUT - URELEmbedded Development on ESP32 - FEKT VUT - UREL
Embedded Development on ESP32 - FEKT VUT - UREL
 
Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...
 
Lessons learned with kubernetes in production at PlayPass
Lessons learned with kubernetes in productionat PlayPassLessons learned with kubernetes in productionat PlayPass
Lessons learned with kubernetes in production at PlayPass
 
Log management with Graylog2 - FrOSCon 2012
Log management with Graylog2 - FrOSCon 2012Log management with Graylog2 - FrOSCon 2012
Log management with Graylog2 - FrOSCon 2012
 
Leiningen2 - humane build management for clojure
Leiningen2 - humane build management for clojureLeiningen2 - humane build management for clojure
Leiningen2 - humane build management for clojure
 
Observability
ObservabilityObservability
Observability
 
2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com2015 DockerCon Using Docker in production at bity.com
2015 DockerCon Using Docker in production at bity.com
 
A gentle intro to Golang and the Go-universe
A gentle intro to Golang and the Go-universeA gentle intro to Golang and the Go-universe
A gentle intro to Golang and the Go-universe
 
OSC-Fall-Tokyo-2012-v9.pdf
OSC-Fall-Tokyo-2012-v9.pdfOSC-Fall-Tokyo-2012-v9.pdf
OSC-Fall-Tokyo-2012-v9.pdf
 
InfluxCloudi craft container orchestrator
InfluxCloudi craft container orchestratorInfluxCloudi craft container orchestrator
InfluxCloudi craft container orchestrator
 
Embedded Rust on ESP2 - Rust Linz
Embedded Rust on ESP2 - Rust LinzEmbedded Rust on ESP2 - Rust Linz
Embedded Rust on ESP2 - Rust Linz
 
BDM32: AdamCloud Project - Part II
BDM32: AdamCloud Project - Part IIBDM32: AdamCloud Project - Part II
BDM32: AdamCloud Project - Part II
 
Adrian Mouat - Docker Tips and Tricks
 Adrian Mouat - Docker Tips and Tricks Adrian Mouat - Docker Tips and Tricks
Adrian Mouat - Docker Tips and Tricks
 
Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)Composer (PHP Usergroup Karlsruhe)
Composer (PHP Usergroup Karlsruhe)
 
SPFx Team based Development using Docker
SPFx Team based Development using DockerSPFx Team based Development using Docker
SPFx Team based Development using Docker
 

More from elliando dias

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScriptelliando dias
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structureselliando dias
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de containerelliando dias
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!elliando dias
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Webelliando dias
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduinoelliando dias
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorceryelliando dias
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Designelliando dias
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makeselliando dias
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.elliando dias
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebookelliando dias
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Studyelliando dias
 

More from elliando dias (20)

Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Why you should be excited about ClojureScript
Why you should be excited about ClojureScriptWhy you should be excited about ClojureScript
Why you should be excited about ClojureScript
 
Functional Programming with Immutable Data Structures
Functional Programming with Immutable Data StructuresFunctional Programming with Immutable Data Structures
Functional Programming with Immutable Data Structures
 
Nomenclatura e peças de container
Nomenclatura  e peças de containerNomenclatura  e peças de container
Nomenclatura e peças de container
 
Geometria Projetiva
Geometria ProjetivaGeometria Projetiva
Geometria Projetiva
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!How to Make an Eight Bit Computer and Save the World!
How to Make an Eight Bit Computer and Save the World!
 
Ragel talk
Ragel talkRagel talk
Ragel talk
 
A Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the WebA Practical Guide to Connecting Hardware to the Web
A Practical Guide to Connecting Hardware to the Web
 
Introdução ao Arduino
Introdução ao ArduinoIntrodução ao Arduino
Introdução ao Arduino
 
Minicurso arduino
Minicurso arduinoMinicurso arduino
Minicurso arduino
 
Incanter Data Sorcery
Incanter Data SorceryIncanter Data Sorcery
Incanter Data Sorcery
 
Rango
RangoRango
Rango
 
Fab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine DesignFab.in.a.box - Fab Academy: Machine Design
Fab.in.a.box - Fab Academy: Machine Design
 
The Digital Revolution: Machines that makes
The Digital Revolution: Machines that makesThe Digital Revolution: Machines that makes
The Digital Revolution: Machines that makes
 
Hadoop + Clojure
Hadoop + ClojureHadoop + Clojure
Hadoop + Clojure
 
Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.Hadoop - Simple. Scalable.
Hadoop - Simple. Scalable.
 
Hadoop and Hive Development at Facebook
Hadoop and Hive Development at FacebookHadoop and Hive Development at Facebook
Hadoop and Hive Development at Facebook
 
Multi-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case StudyMulti-core Parallelization in Clojure - a Case Study
Multi-core Parallelization in Clojure - a Case Study
 

Recently uploaded

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Recently uploaded (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
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)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

Slony-I Replication for Asynchronous PostgreSQL Using pgAdmin

  • 1. Slony-I Replication for Asynchronous PostgreSQL Slony-I on Microsoft Windows Dave Page 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 1
  • 2. Slony-I Asynchronous Replication for PostgreSQL Developed by Jan Wieck of Afilias Now a community project 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 2
  • 3. Uses Load balancing Redundancy/Failover Remote/distributed servers Upgrades 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 3
  • 4. Architecture 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 4
  • 5. Flexible Topology 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 5
  • 6. Object types Data Sequence values Schema changes 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 6
  • 7. Porting team Hiroshi Saito pgAdmin, psqlODBC, Npgsql, pgInstaller Dave Page pgAdmin, PostgreSQL, psqlODBC, pgInstaller, Npgsql, pgWeb Magnus Hagander PostgreSQL Server, pgInstaller, pgWeb Andreas Pflug pgAdmin, PostgreSQL Server 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 7
  • 8. Hiroshi Provided the initial ‘quick n dirty’ port. Organised the project 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 8
  • 9. Dave ‘Ducttape’ test suite New regression test suite Build system/Makefiles Patch/CVS management 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 9
  • 10. Magnus Code port slonik – based on Hiroshi’s work slon Reuse pgpipe from PostgreSQL Service control code Event logging 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 10
  • 11. Andreas GUI Management using pgAdmin 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 11
  • 12. Slony-I Replication for Asynchronous PostgreSQL Porting Slony-I Magnus Hagander 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 12
  • 13. Porting overview The bad Designed for Unix Relied on Unix tools and architecture The good Portable between Unixes Based on PostgreSQL build system 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 13
  • 14. Porting Slonik - easy No shell utils available Slonik 1.1 uses SED Hiroshi already fixed Path issues Find the ”share” directory Windows compatible paths 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 14
  • 15. Porting Slon - easy Pthreads Find library to link with Winsock Simple initialization issue Pipes Steal from PostgreSQL Signals Ignore! 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 15
  • 16. Porting slon – a bit more work Eventlog integration Centralised logging already Eventlog when service, stdout when console Create message library Versioning metadata Steal most from PostgreSQL Decimal version number in config.h 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 16
  • 17. Porting slon – most work fork() Service integration Two problems, one solution 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 17
  • 18. Slon – Unix architecture init rc.slony rc.xyz slon watchdog slon watchdog fork() fork() slon engine slon engine 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 18
  • 19. Slon – Windows architecture Service Control Manager init rc.slony rc.xyz slon slon win32 service handler watchdog slon watchdog fork() CreateProcess() CreateProcess() fork() slon engine slon engine 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 19
  • 20. Porting – end result Slon runs on the commandline Only for testing/debugging! Single service, multiple engines One config file per engine Paths stored in registry, add/remove with slon commandline Multiple services, multiple engines Different versions of slon 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 20
  • 21. Simple slony replication DEMO 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 21
  • 22. Base table creation db1 CREATE TABLE t ( name text NOT NULL PRIMARY KEY) INSERT INTO t VALUES (’Dave’) INSERT INTO t VALUES (’Magnus’) db2 CREATE TABLE t ( name text NOT NULL PRIMARY KEY) 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 22
  • 23. Installing Slony slon –regservice slon –addengine c:slonydb1.conf slon –addengine c:slonydb2.conf slon -listengines db1.conf log_level=1 log_timestamp=false cluster_name='test' conn_info='host=127.0.0.1 user=postgres dbname=db1' 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 23
  • 24. Slon setup script # Create slony cluster cluster name = test; node 1 admin conninfo = ’host=127.0.0.1 user=postgres database=db1’; node 2 admin conninfo = ’host=127.0.0.1 user=postgres database=db2’; init cluster (id=1, comment=’Node 1’) # Create set of tables with one table create set (id=1, origin=1) set add table (set id=1, origin=1, id=1, fully qualified name = ’public.t’) 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 24
  • 25. Slon setup script (contd) # Create node for second engine store node (id=2, comment=’Node 2’); # Create paths between the two nodes store path (server=1,client=2, conninfo=’host=127.0.0.1 user=postgres dbname=db1’); store path (server=2,client=1, conninfo=’host=127.0.0.1 user=postgres dbname=db2’); store listen (origin=1, provider=1, receiver=2); store listen (origin=2, provider=2, receiver=1); # Subscribe the slave subscribe set (id=1, provider=1, receiver=2, forward=no) 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 25
  • 26. Slony-I Replication for Asynchronous PostgreSQL Graphical management of Slony-I Andreas Pflug 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 26
  • 27. pgAdmin III architecture C++ wxWidgets 2.6 Native libpq PostgreSQL connection Native Windows and GTK2 look and feel For PostgreSQL 7.3 and above Some helper programs and modules 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 27
  • 28. Slony-I installation: modules Performed by Windows installer Performed by make;make install from source Use identical Slony-I versions on all servers! PostgreSQL servers may have different versions and run on different operating systems 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 28
  • 29. Slony-I installation: Create cluster First node in cluster Node: database with installed cluster and running slon process Uses Slony-I creation scripts See pgAdmin's slony path option 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 29
  • 30. Slony-I installation: Join cluster Create node and copy replication configuration from existing node Installs software in current database from existing cluster 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 30
  • 31. Slony-I installation: paths Path: describes how a slon process connects to other nodes Libpq connect string 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 31
  • 32. Slony-I installation: listens Listen: instructs a node to poll events from other nodes 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 32
  • 33. Slony-I cluster status See node statistics 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 33
  • 34. Slony-I replication sets Set: collection of tables and sequences All table and sequence data originating on one node 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 34
  • 35. Slony-I Tables Table needs unique index, PK preferred pgAdmin doesn‘t offer tables without unique index Select triggers on the table that Slony-I should disable on slave nodes 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 35
  • 36. Slony-I subscriptions Table and sequences must be present in slave node before subscribing! Subscribed sets can‘t be modified; use merge set instead. 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 36
  • 37. Slony-I DDL script replication Use replication to execute changes to subscribed tables to insure master and slave have identical definitions May replicate any DDL script 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 37
  • 38. Slony-I switch over Gracefully exchange master and slave role to a set between two nodes Both nodes must be fully functional Function "move set" 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 38
  • 39. Slony-I fail over Master node has failed Failover tries to restore as much data from slave nodes as possible Designate a new master out of the previous slaves Not yet supported in pgAdmin III V1.4 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 39
  • 40. pgAdmin future Coming in V1.6: Slony-I failover support Set creation wizard Health analysis improvements 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 40
  • 41. Slony-I and pgAdmin Conclusion Most Slony-I functions accessible through easy-to-use GUI At-a-glance view on cluster health Integrated with other administrative tasks PostgreSQL has integrated replication! 28th October 2005 Dave Page - Magnus Hagander - Andreas Pflug 41