Dumping + restoring a subset of a table? - Mailing list pgsql-performance

From Shaul Dar
Subject Dumping + restoring a subset of a table?
Date
Msg-id 234efe30910060616h6be54c20hf863750fd3b0260@mail.gmail.com
Whole thread Raw
Responses Re: Dumping + restoring a subset of a table?  (Joshua Tolley <eggyknap@gmail.com>)
List 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 by date:

Previous
From: "Dave Dutcher"
Date:
Subject: Re: What is the role of #fsync and #synchronous_commit in configuration file .
Next
From: Nikolas Everett
Date:
Subject: Re: Speed / Server