Re: pg_restore taking 4 hours!

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: Vivek Khera <khera(at)kcilink(dot)com>
Subject: Re: pg_restore taking 4 hours!
Date: 2004-12-13 18:43:28
Message-ID: 200412131043.28465.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-13 18:46:13 Re: partial index on boolean, problem with v8.0.0rc1
Previous Message Michael Fuhr 2004-12-13 18:41:02 Re: Substring question

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2004-12-13 19:21:04 Re: pg_restore taking 4 hours!
Previous Message sarlav kumar 2004-12-13 18:33:08 Re: INSERT question