Re: Question on failure during cluster operation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Chris Hoover" <revoohc(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Question on failure during cluster operation
Date: 2006-06-22 17:05:01
Message-ID: 1189.1150995901@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Chris Hoover" <revoohc(at)gmail(dot)com> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jim Nasby 2006-06-23 01:58:14 Re: Dump size bigger than pgdata size?
Previous Message Tom Lane 2006-06-22 15:40:08 Re: clustering takes too long!