Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2D2411337A5D for ; Mon, 2 May 2011 16:05:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 87651-04 for ; Mon, 2 May 2011 19:05:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from acidenitrix.villemain.org (acidenitrix.villemain.org [91.121.90.165]) by mail.postgresql.org (Postfix) with ESMTP id 2D73A133798E for ; Mon, 2 May 2011 16:05:25 -0300 (ADT) Received: from 89-158-240-165.rev.dartybox.com ([89.158.240.165] helo=DimIMac.local) by acidenitrix.villemain.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QGyQl-0001Ko-OX; Mon, 02 May 2011 21:05:15 +0200 Received: by DimIMac.local (Postfix, from userid 501) id C78171F45A6C; Mon, 2 May 2011 21:05:25 +0200 (CEST) From: Dimitri Fontaine To: Greg Stark Cc: Tom Lane , Alvaro Herrera , Christopher Browne , Maxim Boguk , pgsql-bugs Subject: Re: BUG #5946: Long exclusive lock taken by vacuum (not full) Organization: 2ndQuadrant References: <201103250856.p2P8ufGc004544@wwwmaster.postgresql.org> <4345.1301066239@sss.pgh.pa.us> <13556.1301069421@sss.pgh.pa.us> <1301080686-sup-7539@alvh.no-ip.org> <15329.1301082238@sss.pgh.pa.us> <16028.1301086103@sss.pgh.pa.us> User-Mail-Address: dimitri@2ndQuadrant.fr Date: Mon, 02 May 2011 21:05:25 +0200 In-Reply-To: (Greg Stark's message of "Fri, 25 Mar 2011 21:09:33 +0000") Message-ID: User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201105/5 X-Sequence-Number: 30144 Greg Stark writes: > So is it ok for inserting one row to cause my table to grow by 90GB? > Or should there be some maximum size increment at which it stops > growing? What should that maximum be? What if I'm on a big raid system > where that size doesn't even add a block to every stripe element? I'd think that capping the idea to the segment size makes sense. Also, what about having a background process (bgwriter or autovacuum come to mind) doing the work, rather than the backend that happens to be inserting the row? It could send a message, and continue creating a newer 8kb block if the background process has not yet extended the storage. Also, to be safe I guess we could arrange to have the new segment be created way before reaching the very end of the relation (so that adding 8kb does not need to create a new segment, so as to avoid a race condition with the background process doing so itself). Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support