Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id D759186A54C for ; Wed, 18 Jan 2012 11:08:29 -0400 (AST) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RnX7i-0001tJ-BZ for pgsql-admin@postgresql.org; Wed, 18 Jan 2012 15:08:28 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Wed, 18 Jan 2012 09:08:12 -0600 Message-Id: <4F168BF40200002500044900@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Wed, 18 Jan 2012 09:08:04 -0600 From: "Kevin Grittner" To: "Rick Dicaire" , Subject: Re: CLUSTER command References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201201/87 X-Sequence-Number: 38999 Rick Dicaire wrote: > Hi folks...pgsql 8.1 (we're migrating to 9.1 later this year). Good idea. > When running CLUSTER with no args, on tables with multiple > indexes, do I understand correctly that the tables' primary key is > the default index used? To quote the fine documentations at: www.postgresql.org/docs/8.1/interactive/sql-cluster.html | When a table is clustered, PostgreSQL remembers on which index it | was clustered. The form CLUSTER tablename reclusters the table on | the same index that it was clustered before. | | CLUSTER without any parameter reclusters all the tables in the | current database that the calling user owns, or all tables if | called by a superuser. (Never-clustered tables are not included.) > Also, I've been tasked with finding and listing all the tables > that get CLUSTER'd when CLUSTER with no args is executed, http://www.postgresql.org/docs/8.1/interactive/catalog-pg-index.html -Kevin