Trying to pg_restore a 7.1.3 db into 7.3.4 - stalling at 100% CPU w/ no disk access - Mailing list pgsql-admin

From me@shanewright.co.uk (Shane Wright)
Subject Trying to pg_restore a 7.1.3 db into 7.3.4 - stalling at 100% CPU w/ no disk access
Date
Msg-id 3651826a.0311100823.1beca6b9@posting.google.com
Whole thread Raw
Responses Re: Trying to pg_restore a 7.1.3 db into 7.3.4 - stalling at 100%
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: CREATE DATABASE
Next
From: Gaetano Mendola
Date:
Subject: Re: pg_shadow dump annoying problem