From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: COPY with no WAL, in certain circumstances |
Date: | 2007-01-06 17:31:51 |
Message-ID: | 200701061731.l06HVpg22109@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
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 bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-06 17:41:30 | Re: COPY with no WAL, in certain circumstances |
Previous Message | Joshua D. Drake | 2007-01-06 17:16:44 | Re: COPY with no WAL, in certain circumstances |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-06 17:41:30 | Re: COPY with no WAL, in certain circumstances |
Previous Message | Joshua D. Drake | 2007-01-06 17:16:44 | Re: COPY with no WAL, in certain circumstances |