with autovacuum enabled with default settings, cramd.sql is 154M:

[EMAIL PROTECTED]:/pub/back$ time pg_restore -Fc -C -d postgres cramd.sql

real    3m43.687s
user    0m11.689s
sys     0m0.868s
[EMAIL PROTECTED]:/pub/back$

during restore we see scary things like:

[EMAIL PROTECTED]:~# ps awx|grep postgres
 2497 ?        Ss     0:00 postgres: logger process
 2499 ?        Ss     0:00 postgres: writer process
 2500 ?        Ss     0:00 postgres: wal writer process
 2501 ?        Ss     0:00 postgres: autovacuum launcher process
 2502 ?        Ss     0:00 postgres: stats collector process
 2519 pts/0    S+     0:12 pg_restore -Fc -C -d postgres cramd.sql
2521 ? Ss 1:04 postgres: andy cramd [local] CREATE INDEX waiting
 2526 ?        Ss     0:03 postgres: autovacuum worker process   cramd
 2571 ?        Ss     0:01 postgres: autovacuum worker process   cramd
 2582 pts/1    R+     0:00 grep postgres


Now I dropdb and disable autovacuum, restart pg:

[EMAIL PROTECTED]:/pub/back$ time ( pg_restore -Fc -C -d postgres cramd.sql; vacuumdb -z cramd )

real    3m47.229s
user    0m9.933s
sys     0m0.744s

Sweet, about the same amount of time.
Performed on my laptop, an asus m5n, running slackware 12

-Andy

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

               http://www.postgresql.org/about/donate

Reply via email to