Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQfAl-0007fL-Va for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Apr 2013 14:41:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UQfAl-00006G-A3 for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Apr 2013 14:41:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQfAk-00006A-Gt for pgsql-bugs@postgresql.org; Fri, 12 Apr 2013 14:41:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UQfAd-0001lI-8s for pgsql-bugs@postgresql.org; Fri, 12 Apr 2013 14:41:50 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r3CEffn9017001; Fri, 12 Apr 2013 10:41:41 -0400 (EDT) From: Tom Lane To: daniel@heroku.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8058: CLUSTER and VACUUM FULL fail to free space In-reply-to: References: Comments: In-reply-to daniel@heroku.com message dated "Fri, 12 Apr 2013 08:34:24 -0000" Date: Fri, 12 Apr 2013 10:41:41 -0400 Message-ID: <17000.1365777701@sss.pgh.pa.us> X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org daniel@heroku.com writes: > We have a somewhat high-churn table acting as a queue, and over time it's > grown to be something like a gigabyte. I surmised it might be vanilla > bloat, but the truth seems somewhat more exotic because both VACUUM FULL and > CLUSTER generated absolutely no new free space. > In the end, ALTER TABLE and CREATE TABLE ... (LIKE) ran nearly instantly and > got the table size down to a few hundred K from 900M. My money is on there being old idle transactions somewhere that kept recently-dead rows from being reclaimable. If memory serves, VACUUM FULL and CLUSTER will faithfully retain such rows, but of course a manual data transfer like that wouldn't. > We have retained the old bloated table so we can poke at it. I think contrib/pgstattuple could tell you about dead tuples. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs