title: Moving Postgres tablespaces and tables across EC2 instance
body: <p>I have postgres database running on Amazon EC2 instance. I have few tablespaces created for
  some monthly tables, such that each table is on individual tablespace. To get the maximum performance, I have created each tablespace on individual amazon ebs volume.</p>
  
  <p>I want to move some of this tables to different instance and database. I will explain it with one example. 
  Lets say.  </p>
  
  <ol>
  <li><p>I have EC2 instance A with postgres setup as explained above.</p></li>
  <li><p>I have another Amazon instance B running and I installed postgres on it as well.</p></li>
  <li><p>I want to create the same table structure for some of the tables present in A on B. I want to detach the volumes from instance A and attach it to instance B.</p></li>
  <li><p>Also, I want to create tablespaces on instance B, which will point to the newly attached volumes.</p></li>
  <li><p>And when I start up this newly created postgres, I expect to see the tables populated with data from those volumes(database).</p></li>
  <li><p>finally I will delete those tables from A</p></li>
  </ol>
  
  <p>I know I am being rusty in writing, but couldn't find a better way to ask the question.</p>
  
  <p>Is something along these lines is possible? Are there any pointers for achieving something like this?</p>