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
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