Saturday, May 15, 2010

5 steps to implement a PostgreSQL replication system

Yesterday, I tried to build a PostgreSQL master-slave replication system with new feature "Streaming Replication (SR)", which is coming in the next PostgreSQL major release 9.0 as a built-in replication solution, and it worked well on my servers.

I feel it is very easy to configure, so I have decided to make some memos here for building a PostgreSQL master-slave replication system.

Here are 5 steps to implement a PostgreSQL replication system.
  1. Build and install binaries.
  2. Initialize a database cluster and duplicate it.
  3. Configure the master node.
  4. Configure the slave node(s).
  5. Start the master and slave node(s).
Ok, let's start.

(This photo was taken at the PostgreSQL 9 TestFest Japan.)