Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UnXRH-00052u-Px for pgsql-admin@arkaria.postgresql.org; Fri, 14 Jun 2013 17:05:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UnXRH-0003CT-0z for pgsql-admin@arkaria.postgresql.org; Fri, 14 Jun 2013 17:05:27 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UnXRG-0003CO-91 for pgsql-admin@postgresql.org; Fri, 14 Jun 2013 17:05:26 +0000 Received: from valerius8.ch-meta.net ([80.74.135.8]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UnXRC-0002Pd-Sv for pgsql-admin@postgresql.org; Fri, 14 Jun 2013 17:05:25 +0000 Received: (qmail 1910 invoked from network); 14 Jun 2013 19:04:21 +0200 Received: from 80-219-184-196.dclient.hispeed.ch (HELO ?10.0.1.4?) (80.219.184.196) by valerius.ch-meta.net with ESMTPSA (AES128-SHA encrypted, authenticated); 14 Jun 2013 19:04:21 +0200 From: Michael Kussmaul Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: VACUUM FULL into another tablespace? Message-Id: <762524C5-AC0B-48C5-897E-6313C1ABC52E@nix.ch> Date: Fri, 14 Jun 2013 19:04:19 +0200 To: pgsql-admin@postgresql.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) X-Mailer: Apple Mail (2.1508) X-Pg-Spam-Score: 0.8 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org I have a very large table on my PostgreSQL 9.1 database (openstreetmap data= : 64GB data + 100GB indexes in one particular table) stored on a dedicated = 220GB SSD-disk (tablespace "SSD"). I would like to run "VACUUM (FULL, FREEZ= E, ANALYZE)" on that table to reclaim some tablespace. But as you can see, = such an operation fails, because rebuilding that table takes an additional = 160GB of data - the SSD is just too small for that. What I did in the past, was changing the tablespace of that huge table to m= y normal disk (4TB, tablespace "DEFAULT"), run VACUUM there, then changing = back the tablespace to "SSD". This just takes a very long time, because all= the heavy re-indexing now takes place on my very slow normal disk. I was wondering if there is a way to directly "VACUUM + alter the table spa= ce" in one operation? So basically, the db would read the table on "SSD" an= d places the resulting vacuumed table on tablespace "DEFAULT". Looking at the vacuum man-page this seems not possible - but perhaps I'm mi= ssing something or there exists some workarounds to achieve something simil= ar (reclaiming space)? kind regards Michael --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin