Re: Question on failure during cluster operation - Mailing list pgsql-admin

From Tom Lane
Subject Re: Question on failure during cluster operation
Date
Msg-id 1189.1150995901@sss.pgh.pa.us
Whole thread Raw
In response to Question on failure during cluster operation  ("Chris Hoover" <revoohc@gmail.com>)
List pgsql-admin
"Chris Hoover" <revoohc@gmail.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

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: clustering takes too long!
Next
From: Jim Nasby
Date:
Subject: Re: Dump size bigger than pgdata size?