next generation postgres high availability · postgres-bdr3 advanced clustering & scaling...

18
https://www.2ndQuadrant.com 2ndQuadrant PostgreSQL Solutions for the Enterprise Postgres-BDR3 Advanced Clustering & Scaling Next Generation Postgres High Availability Simon Riggs December 2019

Upload: others

Post on 28-Jul-2020

45 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Next GenerationPostgres

High AvailabilitySimon Riggs

December 2019

Page 2: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

High Availability/ Disaster Recovery

(Feature set in 2004)

Page 3: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

High Availability/ Disaster Recovery

● Point in Time Recovery (2004)

● Continuous Recovery → Replication (2006/7)

● Physical Streaming Replication (2010)● Hot Standby (2010)

● Synchronous Replication (2011)

Page 4: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Maintenance Task Availability

● Online Backup (2004)

● CREATE INDEX CONCURRENTLY (2006)

● AutoVACUUM cancelled by user DDL (2009)

● DROP INDEX CONCURRENTLY (2012)

● Data Checksums (2013)

Page 5: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Data Availability

● ALTER TABLE VALIDATE CONSTRAINT (2011)

● ALTER TABLE lock reductions (2014-15)

● ALTER TABLE ADD PARTITION (2019)

Page 6: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Sources of Loss of Availability

● Server Uptime● Maintenance Tasks● Software Upgrade● Schema Change● Denial of Service● Human Factors

Page 7: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Sources of Loss of Availability

● Server Uptime● Maintenance Tasks● Software Upgrade● Schema Change● Denial of Service● Human Factors

● AlwaysOn○ Sub-second failover

● Performance/Durability Options○ BDR adds 4 new

replication modes

Page 8: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Sources of Loss of Availability

● Server Uptime● Maintenance

Tasks● Software Upgrade● Schema Change● Denial of Service● Human Factors

● Migration● Major Version Upgrade● Post-migration Backfeed● Hitless reload

○ Restart BDR withoutrestarting Postgres

Page 9: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Sources of Loss of Availability

● Server Uptime● Maintenance

Tasks● Software Upgrade● Schema Change● Denial of Service● Human Factors

● Fully Automatic cluster-level DDL, with fine-grained locking

● Adding Indexes● Changing datatypes● Dropping Partitions

● Adding Tables

● Adding columns● Adding constraints

Page 10: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Sources of Loss of Availability

● Server Uptime● Maintenance

Tasks● Software Upgrade● Schema Change● Denial of Service● Human Factors

● Security● Configurable Timeouts● WAL Pacing● User Resource Controls

Page 11: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Sources of Loss of Availability

● Server Uptime● Maintenance

Tasks● Software Upgrade● Schema Change● Denial of Service● Human Factors

● User Education○ Talks, Books, Docs, Training

● Configuration Management○ TPAexec

● Responsive Support○ 2ndQuadrant Platinum Support

Page 12: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Kubernetes

● System-level failure detection using RAFT● Configuration Management

● Moving everything internally to Kubernetes● Developing BDR operators (1Q2020)

○ Using previously developedTrusted Postgres Architecture (TPA)

● Ready to deliver, migrate and support○ 2ndQuadrant is registered KCSP

Page 13: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Sources of Loss of Availability

● Server Uptime● Maintenance Tasks● Software Upgrade● Schema Change● Denial of Service● Human Factors

Page 14: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Page 15: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

PostgreSQL and Open Source

● Further extensive contributions to PostgreSQL core○ CREATE UNIQUE INDEX NOT VALID○ Config Change Outage Domino○ Disk Space Outage Domino

● PgLogical3 Community Edition 1Q2020

● BDR3 Community Edition 2021

Page 16: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Roadmap● PgLogical Streaming

○ [Kafka, RabbitMQ], Oracle○ More sources/targets

● BDR AlwaysOn○ Concurrency of Large Transactions (COLT)○ Parallel Apply

● AutoScale○ Elastically scalable OLTP Clustering○ Massively Parallel BI/Reporting

Page 17: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

● AutoScale○ Elastically scalable cluster of 2+ Groups○ Optional Read/Write Coordinator Groups(s)○ Optional Disaster Recovery site

AutoScaleMassively Parallel Database & Elastic Scaling

...

Page 18: Next Generation Postgres High Availability · Postgres-BDR3 Advanced Clustering & Scaling PostgreSQL and Open Source Further extensive contributions to PostgreSQL core CREATE UNIQUE

https://www.2ndQuadrant.com

2ndQuadrantPostgreSQL Solutions for the Enterprise

Postgres-BDR3 Advanced Clustering & Scaling

Website https://www.2ndquadrant.com/Blog https://blog.2ndquadrant.com/ Email [email protected]

2ndQuadrantPostgreSQL Solutions