PATCH: Minor notes in CLUSTER page

Started by Andy Lesterover 15 years ago6 messages
#1Andy Lester
andy@petdance.com
1 attachment(s)

I was looking for how to undo a CLUSTER call earlier today. Nothing on
the CLUSTER page told me how to do it, or pointed me to the ALTER TABLE
page. I figure a pointer to would help the next person in my situation.

xoxo,
Andy

--
Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance

Attachments:

cluster-docs.patchtext/plain; charset=us-asciiDownload
diff --git a/doc/src/sgml/ref/cluster.sgml b/doc/src/sgml/ref/cluster.sgml
index 662de36..7afe72a 100644
--- a/doc/src/sgml/ref/cluster.sgml
+++ b/doc/src/sgml/ref/cluster.sgml
@@ -176,6 +176,15 @@ CREATE TABLE <replaceable class="parameter">newtable</replaceable> AS
     temporary file about the same size as the table itself, so peak disk usage
     is about three times the table size instead of twice the table size.
    </para>
+
+   <para>
+    To remove the internal flag that notes that an index has been clustered,
+    use <command>ALTER TABLE</command>.
+<programlisting>
+ALTER TABLE <replaceable class="parameter">table</replaceable> SET WITHOUT CLUSTER;
+</programlisting>
+   </para>
+
  </refsect1>
 
  <refsect1>
#2Robert Haas
robertmhaas@gmail.com
In reply to: Andy Lester (#1)
1 attachment(s)
Re: PATCH: Minor notes in CLUSTER page

On Thu, May 6, 2010 at 3:29 PM, Andy Lester <andy@petdance.com> wrote:

I was looking for how to undo a CLUSTER call earlier today.  Nothing on
the CLUSTER page told me how to do it, or pointed me to the ALTER TABLE
page.  I figure a pointer to would help the next person in my situation.

I've been annoyed by this too and so am in favor of adding a mention
in the documentation, but I think we should mention both the CLUSTER
and SET WITHOUT CLUSTER variants of ALTER TABLE, and since it's only
one sentence I think we should add it adjacent to the existing
sentence discussing remembering the index. My proposed patch
attached; thoughts?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

Attachments:

cluster-docs-rmh.patchapplication/octet-stream; name=cluster-docs-rmh.patchDownload
diff --git a/doc/src/sgml/ref/cluster.sgml b/doc/src/sgml/ref/cluster.sgml
index 662de36..8f89930 100644
--- a/doc/src/sgml/ref/cluster.sgml
+++ b/doc/src/sgml/ref/cluster.sgml
@@ -55,7 +55,10 @@ CLUSTER [VERBOSE]
    When a table is clustered, <productname>PostgreSQL</productname>
    remembers which index it was clustered by.  The form
    <command>CLUSTER <replaceable class="parameter">table_name</replaceable></command>
-   reclusters the table using the same index as before.
+   reclusters the table using the same index as before.  You can also
+   use <literal>CLUSTER</literal> or <literal>SET WITHOUT CLUSTER</literal>
+   forms of <xref linkend="SQL-ALTERTABLE"> to set the index to be used for
+   future cluster operations, or to clear any previous setting.
   </para>
 
   <para>
#3Alvaro Herrera
alvherre@alvh.no-ip.org
In reply to: Robert Haas (#2)
Re: PATCH: Minor notes in CLUSTER page

Excerpts from Robert Haas's message of vie may 07 07:33:55 -0400 2010:

On Thu, May 6, 2010 at 3:29 PM, Andy Lester <andy@petdance.com> wrote:

I was looking for how to undo a CLUSTER call earlier today.  Nothing on
the CLUSTER page told me how to do it, or pointed me to the ALTER TABLE
page.  I figure a pointer to would help the next person in my situation.

I've been annoyed by this too and so am in favor of adding a mention
in the documentation, but I think we should mention both the CLUSTER
and SET WITHOUT CLUSTER variants of ALTER TABLE, and since it's only
one sentence I think we should add it adjacent to the existing
sentence discussing remembering the index. My proposed patch
attached; thoughts?

dept. of minor nitpicks:

change
+ use <literal>CLUSTER</literal> or <literal>SET WITHOUT CLUSTER</literal>

to
+ use the <literal>CLUSTER ON</literal> or <literal>SET WITHOUT CLUSTER</literal>

Other than that, +1 from me.

(Hmm, perhaps even say what each form is for right after mentioning it, instead
of mentioning both and then saying what both are for.)

--

#4Andy Lester
andy@petdance.com
In reply to: Robert Haas (#2)
Re: PATCH: Minor notes in CLUSTER page

nly
one sentence I think we should add it adjacent to the existing
sentence discussing remembering the index. My proposed patch
attached; thoughts?

As long as there's a pointer to the answer I'm happy.

xoa

--
Andy Lester => andy@petdance.com => www.theworkinggeek.com => AIM:petdance

#5Robert Haas
robertmhaas@gmail.com
In reply to: Alvaro Herrera (#3)
Re: PATCH: Minor notes in CLUSTER page

On Fri, May 7, 2010 at 10:44 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:

Excerpts from Robert Haas's message of vie may 07 07:33:55 -0400 2010:

On Thu, May 6, 2010 at 3:29 PM, Andy Lester <andy@petdance.com> wrote:

I was looking for how to undo a CLUSTER call earlier today.  Nothing on
the CLUSTER page told me how to do it, or pointed me to the ALTER TABLE
page.  I figure a pointer to would help the next person in my situation.

I've been annoyed by this too and so am in favor of adding a mention
in the documentation, but I think we should mention both the CLUSTER
and SET WITHOUT CLUSTER variants of ALTER TABLE, and since it's only
one sentence I think we should add it adjacent to the existing
sentence discussing remembering the index.  My proposed patch
attached; thoughts?

dept. of minor nitpicks:

change
+   use <literal>CLUSTER</literal> or <literal>SET WITHOUT CLUSTER</literal>

to
+   use the <literal>CLUSTER ON</literal> or <literal>SET WITHOUT CLUSTER</literal>

Other than that, +1 from me.

(Hmm, perhaps even say what each form is for right after mentioning it, instead
of mentioning both and then saying what both are for.)

I couldn't think of a way to phrase that that was any better than the
way I wrote it and still allowed me to include an xref to the ALTER
TABLE page in a natural way. I am however open to suggestions.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

#6Robert Haas
robertmhaas@gmail.com
In reply to: Alvaro Herrera (#3)
Re: PATCH: Minor notes in CLUSTER page

On Fri, May 7, 2010 at 10:44 AM, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:

Excerpts from Robert Haas's message of vie may 07 07:33:55 -0400 2010:

On Thu, May 6, 2010 at 3:29 PM, Andy Lester <andy@petdance.com> wrote:

I was looking for how to undo a CLUSTER call earlier today.  Nothing on
the CLUSTER page told me how to do it, or pointed me to the ALTER TABLE
page.  I figure a pointer to would help the next person in my situation.

I've been annoyed by this too and so am in favor of adding a mention
in the documentation, but I think we should mention both the CLUSTER
and SET WITHOUT CLUSTER variants of ALTER TABLE, and since it's only
one sentence I think we should add it adjacent to the existing
sentence discussing remembering the index.  My proposed patch
attached; thoughts?

dept. of minor nitpicks:

change
+   use <literal>CLUSTER</literal> or <literal>SET WITHOUT CLUSTER</literal>

to
+   use the <literal>CLUSTER ON</literal> or <literal>SET WITHOUT CLUSTER</literal>

Other than that, +1 from me.

Committed with that change.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company