X-Original-To: pgsql-admin@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 4A0D2925497 for ; Thu, 22 May 2003 12:12:59 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 94921-05 for ; Thu, 22 May 2003 12:12:26 -0400 (EDT) Received: from polaris.pinpointresearch.com (66-7-238-176.cust.telepacific.net [66.7.238.176]) by developer.postgresql.org (Postfix) with ESMTP id 447409256F5 for ; Thu, 22 May 2003 11:12:03 -0400 (EDT) Received: from betelgeuse.pinpointresearch.com (66-7-238-179.cust.telepacific.net [66.7.238.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id A0216103C7; Thu, 22 May 2003 08:11:59 -0700 (PDT) From: Steve Crawford Organization: Pinpoint Research To: Robert Treat , "Eugene M. Zheganin" Subject: Re: Full vacuuming of BIG tables takes too long Date: Thu, 22 May 2003 08:11:59 -0700 User-Agent: KMail/1.5.1 Cc: pgsql-admin@postgresql.org References: <54953117843.20030522103956@norma.perm.ru> <94981743421.20030522183701@norma.perm.ru> <1053612118.2206.323.camel@camel> In-Reply-To: <1053612118.2206.323.camel@camel> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200305220811.59291.scrawford@pinpointresearch.com> X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/307 X-Sequence-Number: 8869 You are likely to run into unhappy situations if you use views, rules, etc. Depending on the version of PG it will either refuse to drop the table if there are dependencies or it will drop it but the views won't be "connected" to the new version of t1 after you run your opreation. Cheers, Steve On Thursday 22 May 2003 07:01, Robert Treat wrote: > Is it possible for you do Begin; Create Table t2 As Select * From t1; > Drop Table t1 ; Alter table t2 Rename To t1; Commit; > > Note you might want to lock t1 from writers, but people could still > select from it while you making the switch. > > Robert Treat