Dumping + restoring a subset of a table?

Поиск
Список
Период
Сортировка
От Shaul Dar
Тема Dumping + restoring a subset of a table?
Дата
Msg-id 234efe30910060616h6be54c20hf863750fd3b0260@mail.gmail.com
обсуждение исходный текст
Ответы Re: Dumping + restoring a subset of a table?  (Joshua Tolley <eggyknap@gmail.com>)
Список pgsql-performance
Hi everyone,

I am looking for a way to dump+restore a subset of a database (on another server), using both selection and projection of the source tables (for simplicity assume a single table).
I understand that pg_dump will not let me do this. One way I considered is creating a view with the subset definition and dumping it instead of the original table. In that case how do I restore the target table from the dumped view (what does pg_dump generate for a view?)? Can I still use pg_dump to create SQL commands (vs the binary file option), and will these still use COPY instead of INSERT statements?

Is there another way to do this? Maybe replication? I care mostly about the time needed to replicate the DB (subset), less so about temp space needed.

Thanks.

-- Shaul

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

Предыдущее
От: "Dave Dutcher"
Дата:
Сообщение: Re: What is the role of #fsync and #synchronous_commit in configuration file .
Следующее
От: Nikolas Everett
Дата:
Сообщение: Re: Speed / Server