Joshua D. Drake wrote:
> On Sat, 2007-01-06 at 11:05 -0500, Bruce Momjian wrote:
> > FYI, I am going need to add documentation in the COPY manual page or no
> > one will know about this performance enhancement.
> 
> I have some questions:
> 
> > > As discussed on -hackers, its possible to avoid writing any WAL at all
> > > for COPY in these circumstances:
> > > 
> > > BEGIN;
> > >   CREATE TABLE foo..
> > >   COPY foo...
> > > COMMIT;
> 
> What if I do this?
> 
> BEGIN;
>    CREATE TABLE foo...
>    INSERT INTO foo VALUES ('1');
>    COPY foo...
> 
> COMMIT;

On ABORT, the entire table disappears, as well as the INSERT, so I don't
see any problem.  I assume the INSERT is WAL logged.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to