Re: Fast CLUSTER - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Fast CLUSTER
Date
Msg-id 20070220173820.GA14018@alvh.no-ip.org
Whole thread Raw
In response to Fast CLUSTER  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: Fast CLUSTER
List pgsql-patches
Simon Riggs wrote:
>
> I've used the heap_sync() API call to improve performance of CLUSTER by
> avoiding WAL when archive_command is not set.

Cool.  I noticed that the SGML seems broken here:

> --- 908,925 ----
>       will perform more slowly when <varname>archive_command</varname>
>       is set, as a result of their needing to write large amounts of WAL.
>       This applies to the following commands:
> !     <itemizedlist>
> !      <listitem><para><command>CREATE TABLE AS SELECT</command></para></listitem>
> !      <listitem><para><command>CREATE INDEX</command></para></listitem>
> !      <listitem><para><command>ALTER TABLE SET TABLESPACE</command></para></listitem>
> !      <listitem><para><command>CLUSTER</command></para></listitem>
> !      <listitem><para><command>COPY</command>, when it is executed after one of
> !       these commands, yet in the same transaction:
> !       <itemizedlist>
> !        <listitem><para><command>CREATE TABLE</command></para></listitem>
> !        <listitem><para><command>TRUNCATE</command></para></listitem>
> !       </itemizedlist>
> !   </itemizedlist>
>     </sect2>

You need to close the <listitem> and <para> opened in the COPY mention.

> +
> + static void
> + heap_sync_relation(Relation rel)
> + {
> +     if (!rel->rd_istemp)

No comment in this function?


--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-patches by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: correct format for date, time, timestamp for XML functionality
Next
From: Andrew Dunstan
Date:
Subject: Re: correct format for date, time, timestamp for XML functionality