From: andy <andy@squeakycode.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Jeff Davis <pgsql@j-davis.com>
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 20:45:01 -0500
Message-ID: <450A059D.4090400@squeakycode.net> (raw)
In-Reply-To: <17022.1158277858@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>
<1158277217.29889.146.camel@dogma.v10.wvs>
<17022.1158277858@sss.pgh.pa.us>
Tom Lane wrote:
> Jeff Davis <pgsql@j-davis.com> writes:
>> Couldn't you just sort by the table names, and ANALYZE the tables in
>> that order? Would that effectively prevent the deadlocks?
>
> That'd work too, I think (I suggested the variant of ordering by OID,
> which is simpler and more reliable). Not sure if it's really worth the
> trouble though --- how many people do you think are doing concurrent
> whole-database ANALYZEs inside transaction blocks?
>
> As-is the code will do the analyzes in pg_class physical row order,
> which is almost good enough --- only if someone did a schema change that
> forced a pg_class row update between the starts of the two ANALYZE runs
> would it possibly fail. So the use-case for a fix is really kinda narrow.
>
> regards, tom lane
Honestly, its not that big a problem, and if there were some doc's,
faq's, etc (and people on the newsgroups) I dont think you should even
worry about it.
It makes sense to me, and if Tom had come back and said, yeah, here is
why, cuz you run autovacuum and at then end of the script you did a
vacuum... they are conflicting... dont do that. I'd be cool with that.
As soon as its common knowledge I think it could be avoided.
Really, isn't it just bulk loads anyway where a person might do this?
-Andy
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: andy@squeakycode.net, tgl@sss.pgh.pa.us, pgsql@j-davis.com, alvherre@alvh.no-ip.org, pgsql-hackers@postgreSQL.org
Subject: Re: [ADMIN] Vacuum error on database postgres
In-Reply-To: <450A059D.4090400@squeakycode.net>
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> <1158277217.29889.146.camel@dogma.v10.wvs> <17022.1158277858@sss.pgh.pa.us> <450A059D.4090400@squeakycode.net>
* 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