Re: pg_restore taking 4 hours! - Mailing list pgsql-performance

From Josh Berkus
Subject Re: pg_restore taking 4 hours!
Date
Msg-id 200412131043.28465.josh@agliodbs.com
Whole thread Raw
In response to pg_restore taking 4 hours!  (Rodrigo Carvalhaes <grupos@carvalhaes.net>)
Responses Re: pg_restore taking 4 hours!
List pgsql-performance
Vivek,

> Do I need a correspondingly large checkpoint timeout then?  Or does
> that matter much?

Yes, you do.

> And does this advice apply if the pg_xlog is on the same RAID partition
> (mine currently is not, but perhaps will be in the future)

Not as much, but it's still a good idea to serialize the load.   With too few
segments, you get a pattern like:

Fill up segments
Write to database
Recycle segments
Fill up segments
Write to database
Recycle segments
etc.

Compared to doing it in one long run of a single cycle, considerble efficiency
is lost.   With a proper 2-array setup, the segments become like a write
buffer for the database, and you want that buffer as large as you can afford
in order to prevent buffer cycling from interrupting database writes.

BTW, for members of the studio audience, checkpoint_segments of 256 is about
8GB.

--
Josh Berkus
Aglio Database Solutions
San Francisco

pgsql-performance by date:

Previous
From: sarlav kumar
Date:
Subject: Re: INSERT question
Next
From: Tom Lane
Date:
Subject: Re: pg_restore taking 4 hours!