The Build


Small PostgreSQL Installations and 9.0 Replication

28 October 2010

Yesterday, I commented on a post about how widespread uptake on 9.0 replication will be. I disagreed with the assessment that “users” (by which we mean small installations of PostgreSQL, defined however you care to) will not be interested in 9.0’s hot standby/streaming replication.

Ultimately, of course, we’ll find out. But I strongly feel that 9.0’s streaming replication will be a big deal for small PostgreSQL installations… indeed, I think it will be a much bigger deal for them than big ones.

First, I’ll happily exclude hobbyist and developer installs of PostgreSQL. I don’t back up my development PG databases more often than once a day, and I certainly don’t have any kind of replication set up for them (unless that’s what I’m developing). The important part, the code, lives in a DVCS, and if I had to reconstruct the db from scratch, no big deal… indeed, I do it all the time.

I’m talking about small installations of PG that are used to as authoritative records of business-critical information: Web site transactions, for example. The fact that, traditionally, these users of PG haven’t been all that into replication solutions has nothing to do with their actual need for replication; instead, it has to do with the solutions they had available.

So, they make do with pg_dumpall and hope for the best… and then call someone like us if that doesn’t work.

But it is fallacious to conclude that because they are not using replication right now, they have no use for it. Ask a corner liquor store if they could afford to have an entire day’s worth of electronic transactions just vanish; I’ll bet a bottle of something cheap that they carry that the answer would be, “Of course not.” It might not be worth a $15,000 consulting engagement to set it up, but it’s worth something, possibly quite a bit.

Indeed, this is one of the things that’s driving adoption of “cloud computing”: The (sometimes erroneous) idea that the cloud provider is managing disaster recovery and high availability for you, included in the cost of your monthly service charge.

tl;dr: PG 9.0’s streaming replication will be widely adopted by smaller installations that use PG to manage business-critical data, specifically because it makes it something a casual DBA can do, something we’ve not had before with PG.

Christopher Browne at 11:56, 28 October 2010:

As one of the Slony-I developers, I completely agree with your comment on it; it is indeed complex and rather fiddly to set up.

The emergence of the WAL-based stuff in the “core” will reduce the need/demand for Slony (and, I expect, Londiste and Bucardo, which are similar in nature). This points to a sort of “opposite” to Josh Drake’s commentary; many of those that need replication will be drawn to the built-in stuff, rather than the 3rd party options, and this is likely a good thing for everyone.

After all, if those that only need the built-in functionality can, indeed, use that, then this alleviates several pressures:

– Casual users who didn’t need the complications of Slony (et al) aren’t forced to figure out how to get it in place and managed. This should make them happier.

– The communities surrounding Slony (et al) are relieved of the duty of supporting such users, and can concentrate on supporting those that really need the extra bells and whistles that trigger-based replication provides.

– And if the forces demanding “make it simpler!” go away, there’s some value to that, too :-).