pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Steve Singer <ssinger@ca.afilias.info>
Cc: PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>
Subject: Re: skip WAL on COPY patch
Date: Tue, 23 Aug 2011 17:20:24 -0300
Message-ID: <1314130747-sup-4856@alvh.no-ip.org> (raw)
In-Reply-To: <CA+TgmoZj_kYAGJvfU0Y6tr2AUSipHQeSsr9pEPS_o5-CmjBLkw@mail.gmail.com>
References: <4E53E7D5.6030808@ca.afilias.info>
	<1739.1314126320@sss.pgh.pa.us>
	<CA+TgmoZj_kYAGJvfU0Y6tr2AUSipHQeSsr9pEPS_o5-CmjBLkw@mail.gmail.com>

Excerpts from Robert Haas's message of mar ago 23 17:08:50 -0300 2011:

> What I think would be really interesting is a way to make this work
> when the table *isn't* empty.  In other words, have a COPY option that
> (1) takes an exclusive lock on the table, (2) writes the data being
> inserted into new pages beyond the old EOF, and (3) arranges for crash
> recovery or transaction abort to truncate the table back to its
> previous length.  Then you could do fast bulk loads even into a table
> that's already populated, so long as you don't mind that the table
> will be excusive-locked and freespace within existing heap pages won't
> be reused.

It seems to me this would be relatively simple if we allowed segments
that are not a full GB in length.  That way, COPY could write into a
whole segment and "attach" it to the table at commit time (say, by
renaming).

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (10+ messages)  latest in thread

Message-ID: <1314130747-sup-4856@alvh.no-ip.org>
Permalink:  ../1314130747-sup-4856@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1314130747-sup-4856@alvh.no-ip.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@commandprompt.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, ssinger@ca.afilias.info
  Subject: Re: skip WAL on COPY patch
  In-Reply-To: <1314130747-sup-4856@alvh.no-ip.org>

* 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