Re: Data split -- Creating a copy of database without outage

Поиск
Список
Период
Сортировка
От Haifeng Liu
Тема Re: Data split -- Creating a copy of database without outage
Дата
Msg-id BLU0-SMTP239E0F0C71120AD3E440D9CB90A0@phx.gbl
обсуждение исходный текст
Ответ на Data split -- Creating a copy of database without outage  ("Igor Shmain" <igor.shmain@gmail.com>)
Ответы Re: Data split -- Creating a copy of database without outage  ("Igor Shmain" <igor.shmain@gmail.com>)
Re: Data split -- Creating a copy of database without outage  ("Igor Shmain" <igor.shmain@gmail.com>)
Список pgsql-admin
Why not use a partitioned table? You can write a trigger to control which partition the coming data should be inserted.

Regards,
----
Liu Haifeng




On May 30, 2012, at 4:13 AM, Igor Shmain wrote:

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

 


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Igor Shmain"
Дата:
Сообщение: Data split -- Creating a copy of database without outage
Следующее
От: "Igor Shmain"
Дата:
Сообщение: Re: Data split -- Creating a copy of database without outage