pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: me@shanewright.co.uk
To: pgsql-admin@postgresql.org
Subject: Trying to pg_restore a 7.1.3 db into 7.3.4 - stalling at 100% CPU w/ no disk access
Date: 10 Nov 2003 08:23:26 -0800
Message-ID: <3651826a.0311100823.1beca6b9@posting.google.com> (raw)

Hi,

I'm trying to upgrade our 25Gb database from 7.1.3 to 7.3.4 - pg_dump
worked fine, although piping through split to get a set of 1Gb files.

But, after a few attempts on using pg_restore to get the data into the
new installation I'm having a few problems; basically it restores  the
first few tables fine (big tables too), but now it's just hanging on
one table; using 100% CPU but hardly touching the disk at all (vmstat
reports about 50kb every few minutes).

pg_dump command was something like...

pg_dump --user=xxx --superuser=xxx --format=t | split -b 1000000000

pg_restore commands are these:

cat xaa xab xac | pg_restore --dbname=xx --superuser=xx --username=xx
--schema-only
cat xaa xab xac | pg_restore --dbname=xx --superuser=xx --username=xx
--data-only --rearrange --disable-triggers--verbose

(dropped a few indices between the two pg_restore's to make things
quicker).

Anyway, it ploughed through the first bit (including a 25 million row
table) in under an hour, but now it's been stalled on one table for 5
hours.

Dunno if it's coincidence or not but this table is the only one with a
BYTEA column, it has a few million rows I think.

Any ideas what might be causing it?  I'm hoping its not some bug in
pg_restore causing an infinite loop or something.

if it helps, the CPU usage (according to top) is all in pg_restore
(not a postmaster process), and (according to vmstat) its about 40%
user and 60% system.

Both installs are (I think, ISP did it), clean source from
PostgreSQL's FTP site, both are running on RH Linux, 7.1.3 on a dual
PIII, 7.3.4 on a P4 Xeon.  Total size of dumped database is 3Gb
(across 3 files).

Any help appreciated,

Thanks,

Shane



view thread (8+ messages)  latest in thread

Message-ID: <3651826a.0311100823.1beca6b9@posting.google.com>
Permalink:  ../3651826a.0311100823.1beca6b9@posting.google.com/
Also on:    postgresql.org/message-id/3651826a.0311100823.1beca6b9@posting.google.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: me@shanewright.co.uk
  Subject: Re: Trying to pg_restore a 7.1.3 db into 7.3.4 - stalling at 100% CPU w/ no disk access
  In-Reply-To: <3651826a.0311100823.1beca6b9@posting.google.com>
  References: <3651826a.0311100823.1beca6b9@posting.google.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox