X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id ED3FC9FA5BA for ; Thu, 22 Jun 2006 14:05:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 08594-07 for ; Thu, 22 Jun 2006 14:05:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 7C5E59FA2F0 for ; Thu, 22 Jun 2006 14:05:09 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k5MH51ZZ001190; Thu, 22 Jun 2006 13:05:01 -0400 (EDT) To: "Chris Hoover" cc: "pgsql-admin@postgresql.org" Subject: Re: Question on failure during cluster operation In-reply-to: <1d219a6f0606220652o18c4be0bp99c443d21f609314@mail.gmail.com> References: <1d219a6f0606220652o18c4be0bp99c443d21f609314@mail.gmail.com> Comments: In-reply-to "Chris Hoover" message dated "Thu, 22 Jun 2006 09:52:34 -0400" Date: Thu, 22 Jun 2006 13:05:01 -0400 Message-ID: <1189.1150995901@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/203 X-Sequence-Number: 22165 "Chris Hoover" writes: > I am wanting to run a cluster on the main table in all of our 200+ > databases. However, my manager wants to know what would happen if we suffer > a major failure while the cluster is running. Nothing. CLUSTER is transaction-safe (at least since PG 7.1 or so) because it writes new separate versions of the files that don't become the "real thing" until commit. Downside of this of course is you need enough free disk space for 2 copies of the table and indexes. If you did have a crash while running CLUSTER, there might be unreferenced temporary files left laying around, which as things currently stand would require manual cleanup if you wanted the disk space back. There wouldn't be any database corruption though. regards, tom lane