pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arnau <arnaulist@andromeiberica.com>
To: pgsql-admin@postgresql.org
Subject: Problems restoring big tables
Date: Fri, 05 Jan 2007 17:32:03 +0100
Message-ID: <459E7D83.3030307@andromeiberica.com> (raw)

Hi all,

   I have to restore a database that its dump using custom format (-Fc) 
takes about 2.3GB. To speed the restore first I have restored everything 
except (played with pg_restore -l) the contents of some tables that's 
where most of the data is stored. This server is a debian running 
PostgreSQL 8.1.4. When I try to restore these table's contents I've got 
an error:

$ time pg_restore -v -d espsm_asme -O -L 
espsm_asme_components_statistics_data.list espsm_asme-20070105-0619.custom
pg_restore: connecting to database for restore
pg_restore: implied data-only restore
pg_restore: restoring data for table "statistics_operators"
pg_restore: ERROR:  out of memory
DETAIL:  Failed on request of size 32.
CONTEXT:  COPY statistics_operators, line 25663678: "137320348  58618027 
        20060804220356-1-93-3096        \N      2006-08-04 22:03:56+02 
1       34675522993  5755     71      1       6       \N"
pg_restore: [archiver (db)] error returned by PQendcopy: ERROR:  out of 
memory
DETAIL:  Failed on request of size 32.
CONTEXT:  COPY statistics_operators, line 25663678: "137320348  58618027 
        20060804220356-1-93-3096        \N      2006-08-04 22:03:56+02 
1       34675522993  5755     71      1       6       \N"
pg_restore: *** aborted because of error

real    23m16.490s
user    1m55.203s
sys     0m5.672s

I don't know how I can solve this. This server has 4GB of RAM plenty of 
space in the disks.

asme@SMLDB005:~/asme_restore$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              28G  2.8G   24G  11% /
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/sdb1              34G  161M   32G   1% /dblog
/dev/sdc1             135G  6.2G  122G   5% /srv
tmpfs                  10M   44K   10M   1% /dev

asme@SMLDB005:~/asme_restore$ cat /proc/sys/kernel/shmmax
163840000


Any idea about how to fix this?


Regards
-- 
Arnau



view thread (3+ messages)  latest in thread

Message-ID: <459E7D83.3030307@andromeiberica.com>
Permalink:  ../459E7D83.3030307@andromeiberica.com/
Also on:    postgresql.org/message-id/459E7D83.3030307@andromeiberica.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: arnaulist@andromeiberica.com
  Subject: Re: Problems restoring big tables
  In-Reply-To: <459E7D83.3030307@andromeiberica.com>
  References: <459E7D83.3030307@andromeiberica.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