Skip to content

Instantly share code, notes, and snippets.

@davidfetter
Last active January 2, 2016 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidfetter/8245220 to your computer and use it in GitHub Desktop.
Save davidfetter/8245220 to your computer and use it in GitHub Desktop.
Parallel partial replica workflow
1. Set up DDL if needed e.g. using the pg_restore --section=pre-data machinery.
2. Open a pool of connections to the destination server.
3. Save out a snapshot on the source server as usual in pg_dump -j.
4. Open j connections to the source server.
5. For each source connection, dump table data as specified (possibly via COPY BINARY) directly to
an open target connection, or buffer if no open target connections are available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment