Re: [HACKERS] no XLOG during COPY?

2008-09-16 Thread Andrew Dunstan
Russell Smith wrote: Andrew Dunstan wrote: [snip] Er, who doesn't know what for certain, exactly? pg_restore will certainly know that it has created the table in another session and can thus safely truncate the table in the same transaction as the data load. cheers andrew

Re: [HACKERS] no XLOG during COPY?

2008-09-16 Thread Russell Smith
Andrew Dunstan wrote: > [snip] >> > > Er, who doesn't know what for certain, exactly? pg_restore will > certainly know that it has created the table in another session and > can thus safely truncate the table in the same transaction as the data > load. > > cheers > > andrew > I'm confused about w

Re: [HACKERS] no XLOG during COPY?

2008-09-15 Thread Andrew Dunstan
Simon Riggs wrote: On Thu, 2008-09-11 at 15:25 -0400, Andrew Dunstan wrote: 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

Re: [HACKERS] no XLOG during COPY?

2008-09-15 Thread Simon Riggs
On Thu, 2008-09-11 at 15:25 -0400, Andrew Dunstan wrote: > 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 a

Re: [HACKERS] no XLOG during COPY?

2008-09-11 Thread Andrew Dunstan
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, b

Re: [HACKERS] no XLOG during COPY?

2008-09-11 Thread Heikki Linnakangas
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 the

Re: [HACKERS] no XLOG during COPY?

2008-09-11 Thread Guillaume Smet
On Thu, Sep 11, 2008 at 9:01 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > Could someone please point me at where this optimization was committed? I'm > having trouble locating it. I think it's this one: http://archives.postgresql.org/pgsql-committers/2007-01/msg00296.php -- Guillaume -- Sen

[HACKERS] no XLOG during COPY?

2008-09-11 Thread Andrew Dunstan
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 s