Why are pg_restore taking that long ? - Mailing list pgsql-general

From Poul Møller Hansen
Subject Why are pg_restore taking that long ?
Date
Msg-id 4FB275FC.70502@pbnet.dk
Whole thread Raw
Responses Re: Why are pg_restore taking that long ?
List pgsql-general
I have just restored a database about 347GB in size

postgres=# select * from pg_database_size('dbname');
  pg_database_size
------------------
      346782483256

using this command:
pg_restore -d dbname -O -Fc dbname.backup

It started at 13/5 21:28 and at 14/5 18:47 all user tables were imported
and indexes were build.
It's on a single SATA drive, so I think that's OK.

But the restore wasn't finished until 15/5 08:47

Looking at the files in the database, all files touched after 14/5
18:47, are system tables:

filename    relfilenode
11750       pg_constraint_conrelid_index
11752       pg_constraint_oid_index
11735        ?
11736       ?
11733       ?
11757       pg_index
11714       ?
11808       pg_trigger_tgconstraint_index
11810       pg_trigger_oid_index
11751       pg_constraint_contypid_index
11809       pg_trigger_tgrelid_tgname_index
11837       pg_depend_depender_index
11744       pg_constraint
11749       pg_constraint_conname_nsp_index
11803       pg_trigger
11835       pg_depend
11838       pg_depend_reference_index
11826       pg_namespace

autovacuum was disabled.

Why is it working that long on the system tables ?

dbname=# select version();
                                                   version

------------------------------------------------------------------------------------------------------------
  PostgreSQL 9.1.3 on x86_64-unknown-linux-gnu, compiled by gcc
(Ubuntu/Linaro 4.6.3-1ubuntu2) 4.6.3, 64-bit


Thanks,
  Poul

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Global Named Prepared Statements
Next
From: Steve Crawford
Date:
Subject: Re: Vacuum does not show in pg_stat_all_tables