Re: COPY with no WAL, in certain circumstances
| От | Bruce Momjian |
|---|---|
| Тема | Re: COPY with no WAL, in certain circumstances |
| Дата | |
| Msg-id | 200701061731.l06HVpg22109@momjian.us обсуждение исходный текст |
| Ответ на | Re: COPY with no WAL, in certain circumstances ("Joshua D. Drake" <jd@commandprompt.com>) |
| Ответы |
Re: COPY with no WAL, in certain circumstances
|
| Список | 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@momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
В списке pgsql-patches по дате отправления: