Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id BC24C5377DB for ; Tue, 29 May 2012 17:14:37 -0300 (ADT) Received: from mail-yw0-f46.google.com ([209.85.213.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SZSoM-0004yX-SR for pgsql-admin@postgresql.org; Tue, 29 May 2012 20:14:36 +0000 Received: by yhmm54 with SMTP id m54so2670597yhm.19 for ; Tue, 29 May 2012 13:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type:x-mailer :content-language:thread-index; bh=zUZGY8VS5LcBFC/G+zqUKxr6pXXOYs5zbE72k75hnWc=; b=vTe6LvkuGpkbQX+QChQGTKGvD+gmj//HHM0+fqcH9qkG8bzHvVh7ppexGhRAyGcXtp onWiGIQPukCH60YIEKBS5ggNnOTY7aMJm/MdQra2N1XI4+DxmJmMi1ywLVjBN4fzsZn8 aT9bqvTeR3ycYKxQ95gmvcQcAWaOV5913PAlU4EGOf8pdf6QHaSseM0VPrSzSVIyyEFc PduJ6V4Et2PglrxMUC+VpPaLw+voU4jbeJOKxji/b5C7nU0NA1uTSxAiac84/h0WM8BP wPN0rcuVzZvYSeYyUbieEoQpA6o7dJ6sbZ43vcAqc5uPr2FxpvxOmBYG872DWz8r4vGA c5cQ== Received: by 10.50.41.165 with SMTP id g5mr8783201igl.13.1338322461321; Tue, 29 May 2012 13:14:21 -0700 (PDT) Received: from Tower (CPE001c1008f624-CM0011aec4f376.cpe.net.cable.rogers.com. [174.118.17.120]) by mx.google.com with ESMTPS id pp4sm2251943igb.5.2012.05.29.13.14.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 May 2012 13:14:20 -0700 (PDT) From: "Igor Shmain" To: 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> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000A_01CD3DB5.FF448D30" X-Mailer: Microsoft Outlook 14.0 Content-Language: en-ca Thread-Index: Ac0914UCcM5t62TVROeFEEvwV+ybUA== X-Pg-Spam-Score: -0.8 (/) X-Archive-Number: 201205/97 X-Sequence-Number: 39586 This is a multipart message in MIME format. ------=_NextPart_000_000A_01CD3DB5.FF448D30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_000A_01CD3DB5.FF448D30 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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

 

------=_NextPart_000_000A_01CD3DB5.FF448D30--