From: Joshua D. Drake <jd@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
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: Thu, 14 Sep 2006 09:01:56 -0700
Message-ID: <45097CF4.7040409@commandprompt.com> (raw)
In-Reply-To: <29469.1158247230@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>
> This behavior dates from a time when there was no good alternative.
> One possible fix today would be to make ANALYZE take
> ShareUpdateExclusive lock instead, thus ensuring there is only one
> ANALYZE at a time on a table. However I'm a bit concerned by the
> possibility that ANALYZE-inside-a-transaction could accumulate a
> whole bunch of such locks in a random order, leading at least to
> a risk of deadlocks against other ANALYZEs. (We have to hold the
> lock till commit, else we aren't fixing the problem.) Do we need a
> specialized lock type just for ANALYZE? Would sorting the target
> list of rel OIDs be enough? Perhaps it's not worth worrying about?
>
Why not an internal lock that people don't see? The behavior would the
following:
conn1: analyze foo;
conn2: analyze foo;
ERROR: analyze already running on foo
conn1: analyze foo;
conn2: analyze;
NOTICE: analyze full started, analyze running on foo, skipping foo
Sincerely,
Joshua D. Drake
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
--
=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/
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: jd@commandprompt.com, tgl@sss.pgh.pa.us, andy@squeakycode.net, alvherre@alvh.no-ip.org, pgsql-hackers@postgresql.org
Subject: Re: [ADMIN] Vacuum error on database postgres
In-Reply-To: <45097CF4.7040409@commandprompt.com>
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> <45097CF4.7040409@commandprompt.com>
* 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