pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tgoodair@ca.afilias.info
To: pgsql-admin@postgresql.org
Subject: Re: Disabling WAL for bulk data loads
Date: Fri, 9 Sep 2005 15:23:36 -0400
Message-ID: <20050909192335.GG13854@dba6.int.libertyrms.com> (raw)
In-Reply-To: <60mzmm6u4r.fsf@dba2.int.libertyrms.com>
References: <BAY108-F115459FF84EB8232582111B9980@phx.gbl>
	<60mzmm6u4r.fsf@dba2.int.libertyrms.com>

On Fri, Sep 09, 2005 at 01:14:28PM -0400, Chris Browne wrote:
> kevinrkeith@hotmail.com ("Kevin Keith") writes:
> > I am coming from an Oracle background - which in the case of bulk data
> > loads there were several options I had where I could disable writing
> > to the redo log to speed up the bulk data load (i.e. direct load, set
> > the user session in no archive logging, set the affected tables to
> > have no logging).
> >
> > I know the COPY command is one option - however it appears the data
> > would need to be in formatted file in order to use it correct? I want
> > to avoid writing a new file out for the COPY command and loading that.
> 
> The options get a bit better in 8.1, as the COPY command supports some
> more format options.
> 
> But you'll DEFINITELY get a big boost if you can format things so COPY
> can work for you.
> 
> > What other options does Postgres 7.4 provide which would allow data
> > loads to bypass writing to the WAL? I don't need to have this enabled
> > - because in the event of a database crash, I would simply reload the
> > data from the source files as recovery.
> 
> Arguably you could turn "fsync = off" in postgresql.conf; there is
> regrettably the increased risk that a crash would trash the ENTIRE
> database, not just the recently-loaded data.

Actually, it may trash all of the databases on that cluster!

> 
> It's somewhat regrettable that you can't turn off logging just for a
> single transaction's context; that would probably be the ideal for
> this...
> -- 
> output = ("cbbrowne" "@" "cbbrowne.com")
> http://cbbrowne.com/info/spreadsheets.html
> "If roach hotels worked on pointy haired people, Microsoft would die."
> -- Pete Koren
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
> 

-- 
Tim Goodaire    416-673-4126    tgoodair@ca.afilias.info
Database Administrator, Afilias Canada Corp.

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (10+ messages)  latest in thread

Message-ID: <20050909192335.GG13854@dba6.int.libertyrms.com>
Permalink:  ../20050909192335.GG13854@dba6.int.libertyrms.com/
Also on:    postgresql.org/message-id/20050909192335.GG13854@dba6.int.libertyrms.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgoodair@ca.afilias.info
  Subject: Re: Disabling WAL for bulk data loads
  In-Reply-To: <20050909192335.GG13854@dba6.int.libertyrms.com>
  References: <BAY108-F115459FF84EB8232582111B9980@phx.gbl> <60mzmm6u4r.fsf@dba2.int.libertyrms.com> <20050909192335.GG13854@dba6.int.libertyrms.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox