Subject: pg_dump and server responsiveness
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/5/2007 10:49:29 PM
"Bryan Murphy" <bryan.murphy@gmail.com> writes:
> When we run pg_dump on our database, our web site becomes completely
> unresponsive. ...
> Does pg_dump create table locks? It doesn't look like an I/O problem
> as far as I can tell...
Only access-share locks, but that could still be an issue if anything in
your system likes to take exclusive locks. Have you looked into
pg_locks to see if anything's getting blocked?
pg_dump is entirely capable of causing an unpleasant amount of I/O
load, but that shouldn't result in "complete unresponsiveness",
and anyway your iostat output doesn't look like you're saturated...
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
Subject: pg_dump and server responsiveness
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/6/2007 11:09:13 AM
"Bryan Murphy" <bryan.murphy@gmail.com> writes:
> It does appear to be lock contention. I took a closer look this
> morning, and I noticed our web site was consistently locking up on a
> particular table, and there were a number of exclusive locks. I
> started eliminating various jobs, and found the one that essentially
> rewrites that particular table every 5 minutes to be the culprit
> (create new table, drop old table, rename new table).
> Is there a better way we can do this so that we won't causes lock
> contention during a dump?
Why dump such a table at all? It evidently doesn't contain any
data you need to preserve ...
I forget which version you are running, but 8.2 pg_dump has an
--exclude-table switch which'd work peachy for this.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
|