From: Martijn van Oosterhout <kleptog@svana.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: andy <andy@squeakycode.net>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers@postgreSQL.org
Subject: Re: [ADMIN] Vacuum error on database postgres
Date: Fri, 15 Sep 2006 11:40:55 +0200
Message-ID: <20060915094055.GD1608@svana.org> (raw)
In-Reply-To: <16508.1158272742@sss.pgh.pa.us>
References: <44F82150.5000809@pnlassociates.com>
<4001.1157121669@sss.pgh.pa.us>
<ee7pua$2bou$1@news.hub.org>
<27602.1158238299@sss.pgh.pa.us>
<45095CDD.8090704@squeakycode.net>
<29469.1158247230@sss.pgh.pa.us>
<1158271045.29889.143.camel@dogma.v10.wvs>
<16508.1158272742@sss.pgh.pa.us>
On Thu, Sep 14, 2006 at 06:25:42PM -0400, Tom Lane wrote:
> Jeff Davis <pgsql@j-davis.com> writes:
> > How would creating a new lock type avoid deadlocks when an ANALYZE is
> > accumulating the locks in random order?
>
> In itself it wouldn't. Josh Drake sketched the idea in more detail
> later: if there is a lock type used *only* for ANALYZE, then you can do
> ConditionalLockAcquire on it, and if you fail, skip the table on the
> assumption that someone else is already doing what you came to do.
Wouldn't it be useful for ANALYZE to do a conditional lock anyway and
skip if it can't acquire. Especially for the analyse-from-autovacuum
case, perhaps an ANALYSE NOLOCK or whatever.
For stuff run from autovacuum, would it be reasonable for the
automatically run version to just abort if it sees someone doing the
same thing?
Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/> From each according to his ability. To each according to his ability to litigate.
Attachments:
signature.asc (application/pgp-signature, 188B) download
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-admin@postgresql.org
Cc: kleptog@svana.org, tgl@sss.pgh.pa.us, pgsql@j-davis.com, andy@squeakycode.net, alvherre@alvh.no-ip.org, pgsql-hackers@postgreSQL.org
Subject: Re: [ADMIN] Vacuum error on database postgres
In-Reply-To: <20060915094055.GD1608@svana.org>
References: <44F82150.5000809@pnlassociates.com> <4001.1157121669@sss.pgh.pa.us> <ee7pua$2bou$1@news.hub.org> <27602.1158238299@sss.pgh.pa.us> <45095CDD.8090704@squeakycode.net> <29469.1158247230@sss.pgh.pa.us> <1158271045.29889.143.camel@dogma.v10.wvs> <16508.1158272742@sss.pgh.pa.us> <20060915094055.GD1608@svana.org>
* 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