Re: no XLOG during COPY?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: no XLOG during COPY?
Date: 2008-09-11 19:25:22
Message-ID: 48C970A2.5030209@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas wrote:
> Andrew Dunstan wrote:
>> Back in February, Tom said here:
>> http://archives.postgresql.org/pgsql-hackers/2008-02/msg00963.php :
>>
>>> That defeats a couple of optimizations that
>>> Simon put in recently. The one for no XLOG during COPY is not too
>>> hard to see how to re-enable, but I'm not sure what else there was.
>>
>> Could someone please point me at where this optimization was
>> committed? I'm having trouble locating it.
>
> http://archives.postgresql.org/pgsql-committers/2007-01/msg00296.php

Great, thanks (and also to Guillaume).

It looks to me like the simple way around this issue would be to provide
an option to have pg_restore emit:
begin; truncate foo; copy foo ... commit;

The truncate will be trivial as there won't be any data or indexes at
that stage anyway.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2008-09-11 19:43:26 Re: Commitfest patches mostly assigned ... status
Previous Message Heikki Linnakangas 2008-09-11 19:10:15 Re: no XLOG during COPY?