Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id AD3DF63249B for ; Mon, 8 Feb 2010 21:47:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 21888-09 for ; Tue, 9 Feb 2010 01:46:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 2214863242D for ; Mon, 8 Feb 2010 21:46:53 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id B8864348040; Mon, 8 Feb 2010 17:46:51 -0800 (PST) Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AxGecjGW-jBy; Mon, 8 Feb 2010 17:46:51 -0800 (PST) Received: from perhan.alvh.no-ip.org (190-95-31-230.bk17-dsl.surnet.cl [190.95.31.230]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 5BA6B348036; Mon, 8 Feb 2010 17:46:51 -0800 (PST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 0718B6E810; Mon, 8 Feb 2010 22:46:49 -0300 (CLST) Date: Mon, 8 Feb 2010 22:46:48 -0300 From: Alvaro Herrera To: Tom Lane Cc: Heikki Linnakangas , pgsql-hackers@postgreSQL.org Subject: Re: Order of operations in lazy_vacuum_rel Message-ID: <20100209014648.GC4113@alvh.no-ip.org> References: <13481.1265650179@sss.pgh.pa.us> <20100208173855.GN4113@alvh.no-ip.org> <13824.1265651227@sss.pgh.pa.us> <20100208191917.GO4113@alvh.no-ip.org> <2770.1265675743@sss.pgh.pa.us> <20100209011808.GA4113@alvh.no-ip.org> <4483.1265679166@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4483.1265679166@sss.pgh.pa.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.544 tagged_above=-10 required=5 tests=AWL=0.055, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/576 X-Sequence-Number: 156919 Tom Lane wrote: > Alvaro Herrera writes: > > Tom Lane wrote: > >> Actually, after thinking about this some more, I realize that this code > >> has got a significantly bigger problem than just whether it will respond > >> to CANCEL promptly. > > > Err, that problem was exactly why I added the interrupt holdoff in > > there, so if you've got a better/more invasive solution, it's very > > welcome. > > Well, that's a pretty incomplete solution :-(. Yeah, we were well aware of that :-) It solved our problem (which was related to interrupts from autovac) > Maybe we should do > something about this. There wasn't any obvious solution before, > but now that we have the nontransactional smgr-level sinval messages > being sent on drops and truncates, it seems like tying rd_targblock > clearing to those would fix the problem. Hmm, sounds good, though I confess not having heard about nontransactional sinval messages before. > The easiest way to do that > would involve moving rd_targblock down to the SMgrRelation struct. > Probably rd_fsm_nblocks and rd_vm_nblocks too. Comments? Can't say it doesn't look like a modularity violation from here -- insertion target block doesn't really belong into smgr, does it? -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.