SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Streaming Replication




Masao Fujii
NTT OSS Center



Copyright(c)2009 NTT, Inc. All Rights Reserved.
What’s Streaming Replication?

• Postgres’ built-in replication
   – Now under development in the community
   – Will be available in v8.5


• Why replication?
   – Fail Over
   – Load Balancing
                                       Client

                               query              query
                      Master                          Slave


                                        changes
Streaming Replication vs Hot Standby

• Streaming Replication (SR)
   – Capability to send changes to the slave, to keep it current


• Hot Standby (HS)
   – Capability to run queries on the slave


                   Client     Hot Standby
           query              query
 Master                           Slave


                    changes
   Streaming Replication
History

• Historical policy
   – Avoid putting replication into core Postgres
   – "one size fits all" replication solution


• Replication war!
                                   rubyrep
                 PL/Proxy
                                warm-standby         DBmirror
  PG on DRBD
                                                            Slony-I
           Cybercluster
                                                syncreplicator
       PGCluster-II
                                              Londiste
   Postgres-R                                             Monmoth
                                                Bucardo
     pgpool
                Sequoia
                                             RepDB        twin
   pgpool-II
                    PyReplica
        GridSQL                                  PostgresForest
                            PG on Shared Disk
          PGCluster
Road to core

• Growing frustration
   – Too complex to install and use for simple cases
   – vs. other dbms


• Proposal of built-in replication
   – by NTT OSSC @ PGCon 2008 Ottawa


• Core team statement
   – It is time to include a simple, reliable basic
     replication feature in the core system
   – NOT replace the existing projects
Master - Slaves

• One master and one or more slaves
   – Only master accepts write queries
   – One-way replication: master    slaves


                  Client


        write query         Slaves
  Master


                 changes
Log-shipping

• WAL is shipped as data changes
   – Slave can be kept current by replaying WAL
   – WAL records in partially-filled WAL file can be shipped
   ⇔Cannot in warm-standby


                          Client
      write query                                   H/W architecture and
                                                    major postgres release
   Master                        Slave              level must be the same


                    WAL
                                 Recovery

     WAL                   WAL           Database
Log-shipping

• No migration required
   – Provides the same interface as the stand-alone
     Postgres does
   ⇔Tables must have a primary key for Slony-I
   ⇔Some queries (e.g., sequences) would have
     different values on different servers in pgpool


   Client                                       Client


               No need to change the
               existing application    Master        Slave
               code for replication



 Stand-alone
Per database cluster granularity

• Replicates all database objects
   – No need to specify which object is replicated
   – NOT replicate: server’s log file, statistics
     information, ...etc
   ⇔Per-table in Slony-I


Per database cluster               Per table




 Master      Slave                  Master      Slave
Shared nothing architecture

• WAL is shipped via network
    – No single point of failure
    – No special H/W like shared disk required




Shared nothing                 Shared disk



     Master      Slave        Master             Slave
Management

• Fail Over
   – Anytime, slave can be brought up
   – Automatic failover is not supported
   ⇒ Need to use clusterware like heartbeat for that

• Split
   – Anytime, master can become stand-alone

  Fail Over                   Split

               Client                      Client

  Master      Slave           Master       Slave
Management

• Online-Resync
   – Anytime, new slave can be added to replication
     without downtime

               Client




    Master




                                 Slave
Synchronization mode


        Master         Slave
modes
        fsync    write fsync apply
                                     fast
async     ✔
write     ✔       ✔
fsync     ✔       ✔     ✔
apply     ✔       ✔            ✔        durable
Synchronization mode

• async
   – Asynchronous replication
   – Possible risk of data loss
   – No master overhead


• write, fsync
   – Semi-synchronous
   – No data loss


• apply
   – Synchronous
   – READ COMMITTED on slave is guaranteed
   – Large master overhead
Synchronization mode

• The mode can be specified per transaction
   – Mission critical trasanction like banking would
     requires write, fsync or apply mode
   – async would be sufficient for transaction like
     web crawling

   Needs durability            Needs speed

     SET mode TO fsync          SET mode TO async
Built-in

• Easy to install and use
   – Just install postgres
   – Replication connection can be treat the same as normal
     backend connection: pg_hba.conf, keepalive, SSL, ...


• Highly active community
   – Bug fix soon
   – Active development and collaboration
   – Many users
Road to v8.5

• Needs your help
   – Comment about interface, design and architecture
   – Test and review the code
   – Correct my English on the doc


• Project site
   – http://wiki.postgresql.org/wiki/Streaming_Replication


• Where to comment and report bug ...
   – pgsql-hackers@postgresql.org
   – pgsql-jp@ml.postgresql.jp

Mais conteúdo relacionado

Mais procurados

One Tool to Rule Them All- Seamless SQL on MongoDB, MySQL and Redis with Apac...
One Tool to Rule Them All- Seamless SQL on MongoDB, MySQL and Redis with Apac...One Tool to Rule Them All- Seamless SQL on MongoDB, MySQL and Redis with Apac...
One Tool to Rule Them All- Seamless SQL on MongoDB, MySQL and Redis with Apac...
Tim Vaillancourt
 
Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2 Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2
Denish Patel
 

Mais procurados (20)

PostgreSQL9.3 Switchover/Switchback
PostgreSQL9.3 Switchover/SwitchbackPostgreSQL9.3 Switchover/Switchback
PostgreSQL9.3 Switchover/Switchback
 
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecturehbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecture
 
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
 
PostgreSQL Scaling And Failover
PostgreSQL Scaling And FailoverPostgreSQL Scaling And Failover
PostgreSQL Scaling And Failover
 
PostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use CasesPostreSQL HA and DR Setup & Use Cases
PostreSQL HA and DR Setup & Use Cases
 
On The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL ClusterOn The Building Of A PostgreSQL Cluster
On The Building Of A PostgreSQL Cluster
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in PinterestHBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
 
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte DataProblems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
Problems with PostgreSQL on Multi-core Systems with MultiTerabyte Data
 
PostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter TuningPostgreSQL Hangout Parameter Tuning
PostgreSQL Hangout Parameter Tuning
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
Streaming huge databases using logical decoding
Streaming huge databases using logical decodingStreaming huge databases using logical decoding
Streaming huge databases using logical decoding
 
One Tool to Rule Them All- Seamless SQL on MongoDB, MySQL and Redis with Apac...
One Tool to Rule Them All- Seamless SQL on MongoDB, MySQL and Redis with Apac...One Tool to Rule Them All- Seamless SQL on MongoDB, MySQL and Redis with Apac...
One Tool to Rule Them All- Seamless SQL on MongoDB, MySQL and Redis with Apac...
 
Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2 Deploying postgre sql on amazon ec2
Deploying postgre sql on amazon ec2
 
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
Ilya Kosmodemiansky - An ultimate guide to upgrading your PostgreSQL installa...
 
Logical replication with pglogical
Logical replication with pglogicalLogical replication with pglogical
Logical replication with pglogical
 
Postgres-XC: Symmetric PostgreSQL Cluster
Postgres-XC: Symmetric PostgreSQL ClusterPostgres-XC: Symmetric PostgreSQL Cluster
Postgres-XC: Symmetric PostgreSQL Cluster
 
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
 
PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized World
 
Streaming replication in practice
Streaming replication in practiceStreaming replication in practice
Streaming replication in practice
 
Case Studies on PostgreSQL
Case Studies on PostgreSQLCase Studies on PostgreSQL
Case Studies on PostgreSQL
 

Semelhante a Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)

Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
pittmantony
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance out
Performance outPerformance out
Performance out
Jack Huang
 
Performance_Out.pptx
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptx
sanjanabal
 

Semelhante a Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan) (20)

Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
 
Applications in the Cloud
Applications in the CloudApplications in the Cloud
Applications in the Cloud
 
Ceph Community Talk on High-Performance Solid Sate Ceph
Ceph Community Talk on High-Performance Solid Sate Ceph Ceph Community Talk on High-Performance Solid Sate Ceph
Ceph Community Talk on High-Performance Solid Sate Ceph
 
FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...
FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...
FOSS4G In The Cloud: Using Open Source to build Cloud based Spatial Infrastru...
 
Using galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wanUsing galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wan
 
PostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized WorldPostgreSQL High Availability in a Containerized World
PostgreSQL High Availability in a Containerized World
 
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedInJay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
Jay Kreps on Project Voldemort Scaling Simple Storage At LinkedIn
 
Using galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wanUsing galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wan
 
Using galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wanUsing galera replication to create geo distributed clusters on the wan
Using galera replication to create geo distributed clusters on the wan
 
MySQL Replication: Pros and Cons
MySQL Replication: Pros and ConsMySQL Replication: Pros and Cons
MySQL Replication: Pros and Cons
 
Streaming and Messaging
Streaming and MessagingStreaming and Messaging
Streaming and Messaging
 
Galera webinar migration to galera cluster from my sql async replication
Galera webinar migration to galera cluster from my sql async replicationGalera webinar migration to galera cluster from my sql async replication
Galera webinar migration to galera cluster from my sql async replication
 
Built-in Replication in PostgreSQL
Built-in Replication in PostgreSQLBuilt-in Replication in PostgreSQL
Built-in Replication in PostgreSQL
 
Tuning kafka pipelines
Tuning kafka pipelinesTuning kafka pipelines
Tuning kafka pipelines
 
Large-scale projects development (scaling LAMP)
Large-scale projects development (scaling LAMP)Large-scale projects development (scaling LAMP)
Large-scale projects development (scaling LAMP)
 
Performance out
Performance outPerformance out
Performance out
 
Performance out
Performance outPerformance out
Performance out
 
Performance_Out.pptx
Performance_Out.pptxPerformance_Out.pptx
Performance_Out.pptx
 
2 7
2 72 7
2 7
 

Mais de Masao Fujii

Mais de Masao Fujii (10)

カスタムプランと汎用プラン
カスタムプランと汎用プランカスタムプランと汎用プラン
カスタムプランと汎用プラン
 
Introduction to pg_cheat_funcs
Introduction to pg_cheat_funcsIntroduction to pg_cheat_funcs
Introduction to pg_cheat_funcs
 
PostgreSQL Quiz
PostgreSQL QuizPostgreSQL Quiz
PostgreSQL Quiz
 
誰か私のTODOを解決してください
誰か私のTODOを解決してください誰か私のTODOを解決してください
誰か私のTODOを解決してください
 
WAL圧縮
WAL圧縮WAL圧縮
WAL圧縮
 
使ってみませんか?pg hint_plan
使ってみませんか?pg hint_plan使ってみませんか?pg hint_plan
使ってみませんか?pg hint_plan
 
PostgreSQLレプリケーション徹底紹介
PostgreSQLレプリケーション徹底紹介PostgreSQLレプリケーション徹底紹介
PostgreSQLレプリケーション徹底紹介
 
PostgreSQL V9 レプリケーション解説
PostgreSQL V9 レプリケーション解説PostgreSQL V9 レプリケーション解説
PostgreSQL V9 レプリケーション解説
 
PostgreSQL9.0アップデート レプリケーションがやってきた!
PostgreSQL9.0アップデート レプリケーションがやってきた!PostgreSQL9.0アップデート レプリケーションがやってきた!
PostgreSQL9.0アップデート レプリケーションがやってきた!
 
PostgreSQL9.1同期レプリケーションとPacemakerによる高可用クラスタ化の紹介
PostgreSQL9.1同期レプリケーションとPacemakerによる高可用クラスタ化の紹介PostgreSQL9.1同期レプリケーションとPacemakerによる高可用クラスタ化の紹介
PostgreSQL9.1同期レプリケーションとPacemakerによる高可用クラスタ化の紹介
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Streaming Replication (Keynote @ PostgreSQL Conference 2009 Japan)

  • 1. Streaming Replication Masao Fujii NTT OSS Center Copyright(c)2009 NTT, Inc. All Rights Reserved.
  • 2. What’s Streaming Replication? • Postgres’ built-in replication – Now under development in the community – Will be available in v8.5 • Why replication? – Fail Over – Load Balancing Client query query Master Slave changes
  • 3. Streaming Replication vs Hot Standby • Streaming Replication (SR) – Capability to send changes to the slave, to keep it current • Hot Standby (HS) – Capability to run queries on the slave Client Hot Standby query query Master Slave changes Streaming Replication
  • 4. History • Historical policy – Avoid putting replication into core Postgres – "one size fits all" replication solution • Replication war! rubyrep PL/Proxy warm-standby DBmirror PG on DRBD Slony-I Cybercluster syncreplicator PGCluster-II Londiste Postgres-R Monmoth Bucardo pgpool Sequoia RepDB twin pgpool-II PyReplica GridSQL PostgresForest PG on Shared Disk PGCluster
  • 5. Road to core • Growing frustration – Too complex to install and use for simple cases – vs. other dbms • Proposal of built-in replication – by NTT OSSC @ PGCon 2008 Ottawa • Core team statement – It is time to include a simple, reliable basic replication feature in the core system – NOT replace the existing projects
  • 6. Master - Slaves • One master and one or more slaves – Only master accepts write queries – One-way replication: master slaves Client write query Slaves Master changes
  • 7. Log-shipping • WAL is shipped as data changes – Slave can be kept current by replaying WAL – WAL records in partially-filled WAL file can be shipped ⇔Cannot in warm-standby Client write query H/W architecture and major postgres release Master Slave level must be the same WAL Recovery WAL WAL Database
  • 8. Log-shipping • No migration required – Provides the same interface as the stand-alone Postgres does ⇔Tables must have a primary key for Slony-I ⇔Some queries (e.g., sequences) would have different values on different servers in pgpool Client Client No need to change the existing application Master Slave code for replication Stand-alone
  • 9. Per database cluster granularity • Replicates all database objects – No need to specify which object is replicated – NOT replicate: server’s log file, statistics information, ...etc ⇔Per-table in Slony-I Per database cluster Per table Master Slave Master Slave
  • 10. Shared nothing architecture • WAL is shipped via network – No single point of failure – No special H/W like shared disk required Shared nothing Shared disk Master Slave Master Slave
  • 11. Management • Fail Over – Anytime, slave can be brought up – Automatic failover is not supported ⇒ Need to use clusterware like heartbeat for that • Split – Anytime, master can become stand-alone Fail Over Split Client Client Master Slave Master Slave
  • 12. Management • Online-Resync – Anytime, new slave can be added to replication without downtime Client Master Slave
  • 13. Synchronization mode Master Slave modes fsync write fsync apply fast async ✔ write ✔ ✔ fsync ✔ ✔ ✔ apply ✔ ✔ ✔ durable
  • 14. Synchronization mode • async – Asynchronous replication – Possible risk of data loss – No master overhead • write, fsync – Semi-synchronous – No data loss • apply – Synchronous – READ COMMITTED on slave is guaranteed – Large master overhead
  • 15. Synchronization mode • The mode can be specified per transaction – Mission critical trasanction like banking would requires write, fsync or apply mode – async would be sufficient for transaction like web crawling Needs durability Needs speed SET mode TO fsync SET mode TO async
  • 16. Built-in • Easy to install and use – Just install postgres – Replication connection can be treat the same as normal backend connection: pg_hba.conf, keepalive, SSL, ... • Highly active community – Bug fix soon – Active development and collaboration – Many users
  • 17. Road to v8.5 • Needs your help – Comment about interface, design and architecture – Test and review the code – Correct my English on the doc • Project site – http://wiki.postgresql.org/wiki/Streaming_Replication • Where to comment and report bug ... – pgsql-hackers@postgresql.org – pgsql-jp@ml.postgresql.jp