Skip site navigation (1) Skip section navigation (2)

Data split -- Creating a copy of database without outage

From: "Igor Shmain" <igor(dot)shmain(at)gmail(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Data split -- Creating a copy of database without outage
Date: 2012-05-29 20:13:32
Message-ID: 000901cd3dd7$8654a690$92fdf3b0$@gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
Can you please help with advice? 

I need to design a solution for a database which will grow and will require
a horizontal split at some moment. 

Here is how I am planning to do it: Every record in every table has a shard
number. After the database becomes too large (gets too many requests), the
tables need to be horizontally split. It means that for every table all
records with some specific shard numbers need to be moved to a new database.


My plan is to (1) create a copy of the database on a new server
(backup/restore?), (2) synchronize the databases (how?), and then (3)
forward all requests for the moved shards to the new database. (I will get
rid of the unneeded shards later). An important requirement: there should be
no outage for the users.

What are the ways to achieve it?

 

Thank you in advance,
-igorS

 

Responses

pgsql-admin by date

Next:From: Haifeng LiuDate: 2012-05-30 01:13:22
Subject: Re: Data split -- Creating a copy of database without outage
Previous:From: Guillaume LelargeDate: 2012-05-29 15:32:15
Subject: Re: saved passwords lost when connection fails

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group