Re: pg_dump and server responsiveness - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump and server responsiveness
Date
Msg-id 15661.1196957353@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump and server responsiveness  ("Bryan Murphy" <bryan.murphy@gmail.com>)
Responses Re: pg_dump and server responsiveness
List pgsql-general
"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

pgsql-general by date:

Previous
From: "Bryan Murphy"
Date:
Subject: Re: pg_dump and server responsiveness
Next
From: "Bryan Murphy"
Date:
Subject: Re: pg_dump and server responsiveness