From: | Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: skip WAL on COPY patch |
Date: | 2011-08-23 20:40:43 |
Message-ID: | 4E54104B.107@ca.afilias.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11-08-23 04:17 PM, Tom Lane wrote:
> Robert Haas<robertmhaas(at)gmail(dot)com> writes:
>> 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.
>
> What are you going to do with the table's indexes?
>
> regards, tom lane
>
What about not updating the indexes during the copy operation then to an
automatic rebuild of the indexes after the copy (but during the same
transaction). If your only adding a few rows to a large table this
wouldn't be what you want, but if your only adding a few rows then a
small amount of WAL isn't a big concern either.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-08-23 20:43:13 | Re: skip WAL on COPY patch |
Previous Message | Andrew Dunstan | 2011-08-23 20:30:50 | pg_restore --no-post-data and --post-data-only |