Re: Fast CLUSTER

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Fast CLUSTER
Date: 2007-02-20 17:38:20
Message-ID: 20070220173820.GA14018@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2007-02-20 17:49:26 Re: correct format for date, time, timestamp for XML functionality
Previous Message Pavel Stehule 2007-02-20 16:51:11 Re: correct format for date, time, timestamp for XML functionality