Re: speeding up pg_dump? - Mailing list pgsql-novice

From Tom Lane
Subject Re: speeding up pg_dump?
Date
Msg-id 19455.1135658118@sss.pgh.pa.us
Whole thread Raw
In response to speeding up pg_dump?  (<me@alternize.com>)
List pgsql-novice
<me@alternize.com> writes:
> the pg_dump of our 2.45gb db takes an awfully long 45min during which db
> services come more or less to a hold.
> this does not seem right to me.

Me either.  Do you have operations that are taking exclusive locks on
tables?  pg_dump takes AccessShareLock (ie, a reader's lock) on every
table in sight, to make sure the tables don't disappear or change schema
underneath it.  This doesn't cause any problem for concurrent SELECT,
INSERT/UPDATE/DELETE, nor plain VACUUM ... but it could result in
blocking schema changes, VACUUM FULL, etc.  And if so, those would
in turn block everything else.

Looking at pg_locks would confirm or deny this idea.

            regards, tom lane

pgsql-novice by date:

Previous
From:
Date:
Subject: speeding up pg_dump?
Next
From:
Date:
Subject: Re: speeding up pg_dump?