Re: COPY with no WAL, in certain circumstances - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: COPY with no WAL, in certain circumstances
Date
Msg-id 200701091421.l09ELLZ20205@momjian.us
Whole thread Raw
In response to COPY with no WAL, in certain circumstances  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-patches
Patch withdrawn by author.

---------------------------------------------------------------------------

Simon Riggs wrote:
> http://archives.postgresql.org/pgsql-hackers/2006-10/msg01172.php
>
> As discussed on -hackers, its possible to avoid writing any WAL at all
> for COPY in these circumstances:
>
> BEGIN;
>   CREATE TABLE foo..
>   COPY foo...
> COMMIT;
>
> BEGIN;
>   TRUNCATE foo..
>   COPY foo...
> COMMIT;
>
> The enclosed patch implements this, as discussed. There is no user
> interface to enable/disable, just as with CTAS and CREATE INDEX; no
> docs, just code comments.
>
> This plays nicely with the --single-transaction option in psql to allow
> fast restores/upgrades.
>
> YMMV but disk bound COPY will benefit greatly from this patch, some
> tests showing 100% gain. COPY is still *very* CPU intensive, so some
> tests have shown negligible benefit, fyi, but that isn't the typical
> case.
>
> Applies cleanly to CVS HEAD, passes make check.
>
> --
>   Simon Riggs
>   EnterpriseDB   http://www.enterprisedb.com
>

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

pgsql-patches by date:

Previous
From: "Gurjeet Singh"
Date:
Subject: Re: [HACKERS] [Fwd: Index Advisor]
Next
From: Magnus Hagander
Date:
Subject: vcbuild verbosity