pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Igor Shmain <igor.shmain@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Data split -- Creating a copy of database without outage
Date: Tue, 29 May 2012 16:13:32 -0400
Message-ID: <000901cd3dd7$8654a690$92fdf3b0$@gmail.com> (raw)

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

 

view thread (12+ messages)  latest in thread

Message-ID: <000901cd3dd7$8654a690$92fdf3b0$@gmail.com>
Permalink:  ../000901cd3dd7$8654a690$92fdf3b0$@gmail.com/
Also on:    postgresql.org/message-id/000901cd3dd7$8654a690$92fdf3b0$@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: igor.shmain@gmail.com
  Subject: Re: Data split -- Creating a copy of database without outage
  In-Reply-To: <000901cd3dd7$8654a690$92fdf3b0$@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox