+ All Categories
Home > Documents > Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus...

Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus...

Date post: 27-Sep-2018
Category:
Upload: lequynh
View: 255 times
Download: 3 times
Share this document with a friend
97
Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016
Transcript
Page 1: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Postgresql

High Availability.

Christophe PettusPostgreSQL Experts, Inc.

FOSDEM PGDay 2016

Page 2: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

What do wewant?

Page 3: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

High Availability!

Page 4: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

When do wewant it?

Page 5: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

FATAL: the database system is starting up

Page 6: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

What is “high availability”?

Technologies and processes intended to minimize time the database system is not able to execute

the application’s workload.

Page 7: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

This means…

• … high uptime.

• … fast recovery or provisioning of replacement server.

• … rerouting the application (if required) to the new server.

• In short, minimal time in which there “is no database.”

Page 8: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

We’ll focus on…

• … solutions that use streaming replication to maintain a failover system.

• A couple of exceptions.

• Logical replication (slony, bucardo, londiste, pg_logical) has many virtues, but is not primarily a high availability tool.

Page 9: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

What do we want?

• Automatic promotion

• Reprovisions failed servers

• Single endpoint

• Load balancing

• Environment agnostic

• Any number of secondaries

• Connection pooling

• Open source

Page 10: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

So, what does this?

Page 11: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Nothing.

Page 12: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

No current solution does it all.• Everything has trade-offs.

• You get to decide based on:

• Your environment.

• Your requirements.

• Your patience with scripting.

Page 13: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

We’ll talk about…

• Shared storage

• Bare streaming replication

• HAProxy

• pgpool2

• pg_shard

• Heroku

• Amazon RDS

• Patroni

• Stolon

Page 14: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

You forgot “x”!

• Yes, I did. Oh, well!

• This set is representative of what’s out there right now.

• Others are really not “high availability” solutions, but more for sysadmin convenience.

• Not that there’s anything wrong with that.

Page 15: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

You can write Facebook in PHP.• Many of these solutions can be scripted to

have more complex and advanced functionality.

• Focus here is on out-of-the-box functionality.

Page 16: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

The Options.

Page 17: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Shared Storage

• Database volume is shared at the disk block or file system level.

• DRBD, NFS, SAN, etc., etc.

• A standby machine (configured, not active) is waiting to come up on primary failure.

• Applications rerouted via VIP or manually.

Page 18: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary Standby

Storage

Page 19: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary Standby

Storage

Page 20: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary

Storage

Primary

Page 21: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Single endpoint *

• Any number of secondaries

• Open source

Page 22: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t:

• Automatic promotion

• Reprovisions failed servers

• Load balancing

• Environment agnostic

• Connection pooling

Page 23: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• Significant performance overhead.

• fsync-non-compliance danger.

• “No” risk of losing a committed transaction.

• Master failures can destroy shared storage, so that’s bad.

Page 24: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Bare streaming replication.

• Primary server takes all write traffic.

• Secondary server might handle load balancing, or just run as a standby.

• On failure, manual promotion of secondary, manual rerouting of application (or VIP), manual...

• ... well, you get the idea.

Page 25: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary Secondary

Page 26: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary Secondary

Page 27: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary Primary

Page 28: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Single endpoint *

• Environment agnostic

• Any number of secondaries

• Open source

Page 29: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t.

• Automatic promotion

• Reprovisions failed servers

• Load balancing

• Connection pooling

Page 30: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• Allows for pgbouncer as a pooling option.

• Tools exist to help with some tasks (handyrep, repmgr, etc.).

• Requires human intervention.

• Might be all a relatively simple setup requires.

Page 31: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

HAProxy

• HAProxy in front of a cluster of secondaries.

• If any secondary fails, HAProxy marks it down.

• Primary as backup server.

• If primary fails, manually promote a secondary to new role.

Page 32: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondarySecondary

HAProxy

Page 33: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondarySecondary

HAProxy

Page 34: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondary

HAProxy

Page 35: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondarySecondary

HAProxy

Page 36: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondarySecondarySecondary

HAProxy

Primary

Page 37: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Single endpoint *

• Load balancing *

• Environment agnostic

• Any number of secondaries

• Open source

Page 38: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t:

• Automatic promotion

• Reprovisions failed servers

• Connection pooling

Page 39: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• Write traffic must be directed to primary.

• Lua scripting support might advance to allow for automatic promotion? Maybe?

• Mostly for balancing across secondaries.

• Requires HAProxy 1.6.

Page 40: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

pgpool2

• The traditional solution to this problem.

• Front-end tool that accepts connections, and routes them.

• Can parse queries to assign to primaries or secondaries.

Page 41: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondarySecondary

pgpool2

Page 42: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondarySecondary

pgpool2

Page 43: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondary

pgpool2

Page 44: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondarySecondary

pgpool2

Page 45: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary SecondarySecondarySecondary

pgpool2

Page 46: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Automatic promotion

• Single endpoint

• Load balancing

• Environment agnostic

• Any number of secondaries

• Open source

Page 47: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t:

• Reprovisions failed servers *

• Connection pooling

Page 48: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• Despite name, does not do “connection pooling” in the multiplexing sense.

• Does not have the best reputation for ease of installation or maintenance.

• Requires external scripting to do promotion and node management.

Page 49: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

pg_shard

• Extension to PostgreSQL from Citus Data.

• A master node receives queries.

• A series of shard nodes holds portions of the data.

• HA provided by multiple shards holding the same set of data.

Page 50: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Master

ShardShardShard Shard

Page 51: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Master

ShardShardShard Shard

Page 52: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Master

ShardShard Shard

Page 53: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Master

ShardShardShard Shard

Page 54: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Master

ShardShardShard Shard

Page 55: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Automatic promotion *

• Reprovisions failed servers *

• Single endpoint

• Load balancing

• Any number of secondaries *

• Open source

Page 56: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t:

• Environment agnostic

• Connection pooling

Page 57: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• Master is a single point of failure.

• … so it needs its own HA solution.

• Not transparent to clients.

• Significant restrictions on types of queries and the schema.

• Not just an HA solution: Also does distributed querying.

Page 58: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Heroku

• Commercial PostgreSQL-as-a-service offering.

• Specific for applications running on Heroku’s compute service.

• Essentially a managed community PostgreSQL instance.

• You do not have superuser on the database.

Page 59: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

DatabaseBig Old Cloud of

Apps

Page 60: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

DatabaseBig Old Cloud of

Apps

Page 61: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

DatabaseBig Old Cloud of

Apps

Page 62: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Automatic promotion

• Reprovisions failed servers

• Single endpoint

• Load balancing *

• Any number of secondaries

• Connection pooling *

Page 63: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t:

• Environment agnostic

• Open source

Page 64: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• Heroku manages the database instance for you.

• Accounts can create their own secondaries, for both load balancing and failover purposes.

• Complex relationship between HA features and account plans.

Page 65: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Amazon RDS

• Amazon’s PostgreSQL-as-a-service offering.

• A package of:

• A managed EC2 instance.

• A managed PostgreSQL instance.

• A “shadow” failover machine (using proprietary replication technology).

Page 66: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

DatabaseBig Old Cloud of

EC2 Instances

Page 67: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

DatabaseBig Old Cloud of

EC2 Instances

Page 68: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

DatabaseBig Old Cloud of

EC2 Instances

Page 69: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Automatic promotion

• Reprovisions failed servers

• Single endpoint

Page 70: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t:

• Load balancing

• Environment agnostic

• Any number of secondaries

• Connection pooling

• Open source

Page 71: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• Strange environment if you are used to community PostgreSQL.

• Can put pgbouncer in front for pooling.

• Can create secondaries, but they are load-balance only, not HA.

• You do not have superuser on the database.

Page 72: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Patroni

• https://github.com/zalando/patroni

• Python tool/daemon for managing PostgreSQL servers.

• New, under active development.

• Uses HAProxy as its front end tool.

• Uses etcd or Zookeeper as a distributed system config database.

Page 73: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondaryPrimary SecondarySecondarySecondary

HAProxy

Page 74: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondaryPrimary SecondarySecondarySecondary

HAProxy

Page 75: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary

HAProxy

SecondarySecondarySecondary

Page 76: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondaryPrimary SecondarySecondarySecondary

HAProxy

Page 77: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondaryPrimary

HAProxy

SecondarySecondary

Page 78: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Automatic promotion

• Reprovisions failed servers

• Single endpoint

• Any number of secondaries

• Open source

Page 79: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t:

• Load balancing

• Environment agnostic

• Connection pooling

Page 80: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• The HAProxy is used to route to the current primary.

• You can provision secondaries, but they’re on a different endpoint.

• Hear more about it later today!

Page 81: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Stolon

• https://github.com/sorintlab/stolon

• Relatively new.

• Under active development.

• Written in Go.

Page 82: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondaryPrimary SecondarySecondarySecondary

Proxy

Page 83: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondaryPrimary SecondarySecondarySecondary

Proxy

Page 84: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Primary

Proxy

SecondarySecondarySecondary

Page 85: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondaryPrimary SecondarySecondarySecondary

Proxy

Page 86: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

SecondaryPrimary SecondarySecondary

Proxy

Page 87: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It does:

• Automatic promotion

• Single endpoint

• Any number of secondaries

• Open source

Page 88: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

It doesn’t:

• Reprovisions failed servers

• Load balancing

• Environment agnostic

• Connection pooling

Page 89: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Notes.

• Requires etcd or consul.

• Has a custom proxy.

• New secondary provisioning possible (?) if using kubernetes.

Page 90: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Another way to look at it.

Page 91: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

How much do you like systems

administration?

Page 92: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

How much do you like system adminstration?• I would rather eat my own foot: Heroku,

Amazon RDS.

• Some, but I don’t want to live it: Bare streaming replication, HAProxy.

• I’m OK with it (and don’t mind some development): pg_shard, Patroni, Stolon.

• I laugh at danger: pgpool2.

Page 93: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

One thing nothing does.

• Completely transparent failover.

• All solutions will break connections or cancel queries on a failure.

• Applications recover from this with varying degrees of grace.

Page 94: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

So.

Page 95: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

The perfect HA tool is yet to be.• More work needs to be done here.

• … and a lot is being done.

• … but for deployments right now, you need to make some choices among the available tools.

Page 96: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

Some day.

Page 97: Postgresql High Availability. - thebuild.com · Postgresql High Availability. Christophe Pettus PostgreSQL Experts, Inc. FOSDEM PGDay 2016

thebuild.compgexperts.com

Thank you!

Christophe Pettus@xof


Recommended