Re: pg_dump incredibly slow dumping a single schema from a large db

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Roest <mike(dot)roest(at)replicon(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump incredibly slow dumping a single schema from a large db
Date: 2012-03-30 16:18:25
Message-ID: 21030.1333124305@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Mike Roest <mike(dot)roest(at)replicon(dot)com> writes:
> This dump is currently taking around 8 minutes. While dumping the pg_dump
> process is using 100% of one core in the server (24 core machine). Doing a
> -v pg_dump I found that the following stages are taking the majority of the
> time

> reading user_defined tables (2 minutes and 20 seconds)
> reading dependency data (5 minutes and 30 seconds)

Can you get an execution profile with oprofile or gprof or similar tool?
It doesn't surprise me a lot that pg_dump might have some issues with
large numbers of objects, but guessing which inefficiencies are hurting
you is difficult without more info.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Roest 2012-03-30 16:40:44 Re: pg_dump incredibly slow dumping a single schema from a large db
Previous Message Mike Roest 2012-03-30 15:51:58 pg_dump incredibly slow dumping a single schema from a large db

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2012-03-30 16:27:36 tracking context switches with perf record
Previous Message Andrew Dunstan 2012-03-30 16:11:09 Re: HTTP Frontend? (and a brief thought on materialized views)