pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: Robert Burgholzer <rburghol@vt.edu>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: PostgreSQL Dump rate is too slow
Date: Thu, 8 Jan 2015 13:58:11 +0000 (UTC)
Message-ID: <844546511.3807408.1420725491363.JavaMail.yahoo@jws10097.mail.ne1.yahoo.com> (raw)
In-Reply-To: <CACT-NGJrUVp9x9erKio8-4GmiK+=M75ZVYo1Hhr6U-cht9Z+Gw@mail.gmail.com>
References: <CACT-NGJrUVp9x9erKio8-4GmiK+=M75ZVYo1Hhr6U-cht9Z+Gw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (20+ messages)  latest in thread

Message-ID: <844546511.3807408.1420725491363.JavaMail.yahoo@jws10097.mail.ne1.yahoo.com>
Permalink:  ../844546511.3807408.1420725491363.JavaMail.yahoo@jws10097.mail.ne1.yahoo.com/
Also on:    postgresql.org/message-id/844546511.3807408.1420725491363.JavaMail.yahoo@jws10097.mail.ne1.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: kgrittn@ymail.com, rburghol@vt.edu
  Subject: Re: PostgreSQL Dump rate is too slow
  In-Reply-To: <844546511.3807408.1420725491363.JavaMail.yahoo@jws10097.mail.ne1.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox