Re: pg_dump slower than pg_restore - Mailing list pgsql-general

From Tim Clarke
Subject Re: pg_dump slower than pg_restore
Date
Msg-id 53B5951B.3050006@manifest.co.uk
Whole thread Raw
In response to Re: pg_dump slower than pg_restore  (Bosco Rama <postgres@boscorama.com>)
Responses Re: pg_dump slower than pg_restore  (David Wall <d.wall@computer.org>)
List pgsql-general
On 03/07/14 18:36, Bosco Rama wrote:
> On 07/03/14 10:04, David Wall wrote:
>> A pg_dump backup -- with most of the data stored as large objects --
>> takes about 5 hours.
> If those large objects are 'files' that are already compressed (e.g.
> most image files and pdf's) you are spending a lot of time trying to
> compress the compressed data ... and failing.
>
> Try setting the compression factor to an intermediate value, or even
> zero (i.e. no dump compression).  For example, to get the 'low hanging
> fruit' compressed:
>     $ pg_dump -Z1 -Fc ...
>
> IIRC, the default value of '-Z' is 6.
>
> As usual your choice will be a run-time vs file-size trade-off so try
> several values for '-Z' and see what works best for you.
>
> HTH,
> Bosco.

I'd also check the effect of those other run components; the vacuum's
and other things that are only running with the backup and not during
the restore.

--
Tim Clarke



pgsql-general by date:

Previous
From: Bosco Rama
Date:
Subject: Re: pg_dump slower than pg_restore
Next
From: Steve Kehlet
Date:
Subject: Re: pg_dump slower than pg_restore