Re: skip WAL on COPY patch

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Steve Singer <ssinger(at)ca(dot)afilias(dot)info>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: skip WAL on COPY patch
Date: 2011-08-23 20:20:24
Message-ID: 1314130747-sup-4856@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-08-23 20:30:50 pg_restore --no-post-data and --post-data-only
Previous Message Tom Lane 2011-08-23 20:17:36 Re: skip WAL on COPY patch