L
L
lovesuper2014-03-25 09:39:55
linux
lovesuper, 2014-03-25 09:39:55

How to speed up pg_dump from a remote server?

I have configured synchronization of local db and db from a remote server using pg_dump/pg_restore. Everything works well, but here's one trouble - tables are pumped out very slowly (I completely synchronize the entire database - data and schema). Everything would be fine, but the script running through ssh pumps out db 10 times faster.
How can this be explained and how can direct pg_dump be accelerated without throwing out information?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Salavat Sharapov, 2014-03-25
@desperadik

So, folding a dump from a remote host to a local one occurs in fragments, and you yourself know that the transfer of many small files takes a very long time.
Isn't it better to raise master and slave? and set up a replica?

P
Puma Thailand, 2014-03-25
@opium

Do a binary dump -Fc
should be fast.

V
vasilushechka, 2014-04-05
@vasilushechka

Option 1: use a base backup (Significantly faster than any dump/restore. But keep in mind that you won't be able to remove the base or a part of the base separately, the base backup includes the entire PG cluster).
Option 2: raise the replica + base backup.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question