From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Using multi-row technique with COPY |
Date: | 2005-11-29 20:15:21 |
Message-ID: | 200511292015.jATKFLe17985@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Tom Lane wrote:
> >> Something that would probably be reasonable, and require *no* weird new
> >> syntax, is to shortcut in a COPY into a table created in the current
> >> transaction. I believe we still keep a flag in the relcache indicating
> >> whether that's the case ...
>
> > So if the table is created in the current transaction, we don't log?
>
> Log, yes, unless it's a temp table. The point is we could avoid taking
> buffer content locks. Come to think of it, we could implement that
> trivially in the heapam.c routines; it would then apply to any table
> update whether generated by COPY or otherwise.
I am confused. This optimization prevents locking, but still requires
logging?
> > Yes, I guess, but do we want to propogate that into pg_dump output? I
> > would think not.
>
> Exactly my point; we don't have to change any syntax, so pg_dump
> doesn't care.
But can pg_dump take advantage of this optimization?
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2005-11-29 20:35:03 | Re: Using multi-row technique with COPY |
Previous Message | Tom Lane | 2005-11-29 19:56:39 | Re: Using multi-row technique with COPY |