Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfGfx-000457-So for pgsql-admin@arkaria.postgresql.org; Tue, 29 Apr 2014 22:38:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WfGfx-0002DG-9G for pgsql-admin@arkaria.postgresql.org; Tue, 29 Apr 2014 22:38:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfGfv-0002D7-7y for pgsql-admin@postgresql.org; Tue, 29 Apr 2014 22:38:55 +0000 Received: from cerberus.pinpointresearch.com ([66.7.238.130] helo=polaris.pinpointresearch.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfGfs-0006op-4D for pgsql-admin@postgresql.org; Tue, 29 Apr 2014 22:38:54 +0000 Received: from [192.168.1.179] (betelgeuse.pinpointresearch.com [192.168.1.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id B6EC6E00EC82; Tue, 29 Apr 2014 15:38:50 -0700 (PDT) Message-ID: <536029FA.3@pinpointresearch.com> Date: Tue, 29 Apr 2014 15:38:50 -0700 From: Steve Crawford User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Tom Lane , Rob Richardson CC: "pgsql-admin@postgresql.org" Subject: Re: Slow backups over VPN References: <67D108EDFAD3C148A593E6ED7DCB4BBDD844867A@RADCONWIN2K8PDC.radcon.local> <28744.1398809657@sss.pgh.pa.us> In-Reply-To: <28744.1398809657@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On 04/29/2014 03:14 PM, Tom Lane wrote: > Rob Richardson writes: >> I have a tiny database that I need to take frequent backups of. The database is on a test server in our office. When I'm at the office, backups take only a few seconds. But when I am working from home, connecting to the office through a SonicWall VPN, backups take a few minutes. Other data transfer operations, like file copies, are reasonably fast. I've seen this behavior for databases using PostgreSQL8.4, 9.0 and 9.3. Can you suggest any way that I might get backups to be reasonably fast? > Does your "tiny" database contain lots of small objects (functions, > perhaps)? > > I'm just guessing here, but I wonder if you aren't getting killed by > round-trip latency. pg_dump issues quite a lot of per-object queries, > so if there are lots of objects, high latency would pose a problem even > if the one-way throughput is reasonably fast. It would be interesting > to find out the round trip time through your VPN as measured by, say, > ping. > > If this theory is correct, there's probably no easy fix :-(. > > regards, tom lane > > It seems like pushing the latency and compression issues into the office LAN should work well. For instance: ssh user@machine_in_office "pg_dump -Fc [...standard options...] | buffer" > my_local_file The use of "buffer" may not even be necessary or beneficial but we don't have enough detail to know. This is just one way - plenty of options exist for achieving the same goal. Cheers, Steve -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin