From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Benedict Holland <benedict.m.holland@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Update blocking a select count(*)?
Date: Fri, 15 Jun 2012 14:03:35 -0500
Message-ID: <4FDB40B702000025000484EE@gw.wicourts.gov> (raw)
In-Reply-To: <CAD+mzoykMCtGaAKN9jOyH=nDF1E=EORcs4DSAbbKwvt4jJEXsQ@mail.gmail.com>
References: <CAD+mzoxfm8Wa5hrekeakG_TYNd_dsTR3W3DPZEV90chuzh0N_A@mail.gmail.com>
<CAEYLb_WqEecnjr5o0DoNh15kNF_FXGkErVKw7fCGM5xxNLmrvQ@mail.gmail.com>
<4FDB3C0202000025000484E4@gw.wicourts.gov>
<CAD+mzozTqB8YiFQsgxU5mMqVo01wxVE0yiwoMHD_uSfSApKt7Q@mail.gmail.com>
<CAD+mzoykMCtGaAKN9jOyH=nDF1E=EORcs4DSAbbKwvt4jJEXsQ@mail.gmail.com>
Benedict Holland <benedict.m.holland@gmail.com> wrote:
> 10:25:08.329-04 vacuum (analyze, verbose, full)
> 2096 rmv 33528 postgres 8/151
> AccessExclusiveLock
> Yes 2012-06-15 10:25:08.329-04 vacuum (analyze, verbose,
> full)
> 2096 rmv 50267 postgres 8/151
> AccessExclusiveLock
> Yes 2012-06-15 10:25:08.329-04 vacuum (analyze, verbose,
> full)
You have three VACUUM FULL commands running? VACUUM FULL is very
aggressive maintenance, which is only needed for cases of extreme
bloat. It does lock the table against any concurrent access, since
it is completely rewriting it.
Now, if you are running UPDATE statements which affect all rows in a
table, you will *get* extreme bloat. You either need to do such
updates as a series of smaller updates with VACUUM commands in
between, or schedule your aggressive maintenance for a time when it
can have exclusive access to the tables with minimal impact.
Reporting the other issues without mentioning the VACUUM FULL
processes is a little bit like calling from the Titanic to mention
that the ship isn't going as fast as it should and neglecting to
mention the iceberg. :-)
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, benedict.m.holland@gmail.com
Subject: Re: Update blocking a select count(*)?
In-Reply-To: <4FDB40B702000025000484EE@gw.wicourts.gov>
References: <CAD+mzoxfm8Wa5hrekeakG_TYNd_dsTR3W3DPZEV90chuzh0N_A@mail.gmail.com> <CAEYLb_WqEecnjr5o0DoNh15kNF_FXGkErVKw7fCGM5xxNLmrvQ@mail.gmail.com> <4FDB3C0202000025000484E4@gw.wicourts.gov> <CAD+mzozTqB8YiFQsgxU5mMqVo01wxVE0yiwoMHD_uSfSApKt7Q@mail.gmail.com> <CAD+mzoykMCtGaAKN9jOyH=nDF1E=EORcs4DSAbbKwvt4jJEXsQ@mail.gmail.com> <4FDB40B702000025000484EE@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox