Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 94FC89F9EDB for ; Mon, 24 Sep 2007 06:07:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 79646-06 for ; Mon, 24 Sep 2007 06:07:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from oxford.xeocode.com (unknown [87.127.95.196]) by postgresql.org (Postfix) with ESMTP id 734E49F9ED9 for ; Mon, 24 Sep 2007 06:07:38 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1IZjuW-0006bG-1t; Mon, 24 Sep 2007 10:07:24 +0100 To: "Alvaro Herrera" Cc: "Tom Lane" , "Andrew Dunstan" , "Stefan Kaltenbrunner" , Subject: Re: curious regression failures In-Reply-To: <20070924052821.GF5661@alvh.no-ip.org> (Alvaro Herrera's message of "Mon\, 24 Sep 2007 01\:28\:21 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX" 39204) References: <46EC07E7.9000100@kaltenbrunner.cc> <28630.1189875785@sss.pgh.pa.us> <46ED527A.4090108@kaltenbrunner.cc> <20616.1190214860@sss.pgh.pa.us> <46F1468F.1080903@dunslane.net> <22220.1190219640@sss.pgh.pa.us> <87r6kuh426.fsf@oxford.xeocode.com> <26362.1190236564@sss.pgh.pa.us> <20070921011321.GO30013@alvh.no-ip.org> <18147.1190338010@sss.pgh.pa.us> <20070924052821.GF5661@alvh.no-ip.org> From: Gregory Stark Organization: EnterpriseDB Date: Mon, 24 Sep 2007 10:07:20 +0100 Message-ID: <87zlzctos7.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/930 X-Sequence-Number: 108082 "Alvaro Herrera" writes: > Tom Lane wrote: > >> Idle thought here: did anything get done with the idea of decoupling >> main-table vacuum decisions from toast-table vacuum decisions? vacuum.c >> comments >> >> * Get a session-level lock too. This will protect our access to the >> * relation across multiple transactions, so that we can vacuum the >> * relation's TOAST table (if any) secure in the knowledge that no one is >> * deleting the parent relation. >> >> and it suddenly occurs to me that we'd need some other way to deal with >> that scenario if autovac tries to vacuum toast tables independently. > > Hmm, right. We didn't change this in 8.3 but it looks like somebody > will need to have a great idea before long. > > Of course, the easy answer is to grab a session-level lock for the main > table while vacuuming the toast table, but it doesn't seem very > friendly. Just a normal lock would do, no? At least for normal (non-full) vacuum. I'm not clear why this has to be dealt with at all though. What happens if we don't do anything? Doesn't it just mean a user trying to drop the table will block until the vacuum is done? Or does dropping not take a lock on the toast table? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com