Tom, Alvaro,

> > It has to be a *new* table, not an *empty* table.  If it's already
> > visible to other xacts then somebody else could insert into it in
> > parallel with you, because COPY doesn't take an exclusive lock.

There's still major gains to be had, for ETL, in being able to disable 
logging on new tables/partitions.  *particularly* partitions.

> Contrariwise, it doesn't really matter (I think) if there are WAL-logged
> records already in the table and COPY is adding more that aren't logged.
> (You might have to force COPY to start adding the rows on freshly added
> pages ... hmm ... all of a sudden I think we had this discussion
> already? I for sure remember the fresh-pages trick from some other
> thread.)

Yes, and that's what shot the proposal down before.   But I don't think we 
devoted sufficient discussion to the "new table" case.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to