Re: PostgreSQL Dump rate is too slow - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: PostgreSQL Dump rate is too slow
Date
Msg-id 844546511.3807408.1420725491363.JavaMail.yahoo@jws10097.mail.ne1.yahoo.com
Whole thread Raw
In response to Re: PostgreSQL Dump rate is too slow  (Robert Burgholzer <rburghol@vt.edu>)
List pgsql-admin
Robert Burgholzer <rburghol@vt.edu> wrote:

> To elaborate, I have found the rsync used in my (most?) streaming
> replication setups is 10x or more faster than pg_dump.  If your
> job specs required a pg_dump output file it would be fairly simple
> to do the following (moree or less):
> 1. setup a replicant (even on the same machine but different
>    drive if you wanted)
> 2. make sure the replicant is off
> 3. rsync the data dir to the replicant
> 4. turn on the replicant
> 5. execute pg_dump on the replicant

If the original cluster is running, unless the steps for a PITR
backup are followed, that rsync could generated a corrupted
database.  The corruption may not be immediately apparent, and
might not happen every time, but the above is not safe without a
few more steps.

http://www.postgresql.org/docs/9.2/interactive/continuous-archiving.html

This is not intended as a complete list, but among other things
archiving should be working first, the rsync should exclude the
postmaster.pid file and the files under the pg_xlog directory,
rsync should be preceded by pg_start_backup() and followed by
pg_stop_backup(), and a recovery.conf file is needed.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-admin by date:

Previous
From: Scott Ribe
Date:
Subject: Re: PostgreSQL Dump rate is too slow
Next
From: David G Johnston
Date:
Subject: Re: PostgreSQL Dump rate is too slow