On Wed, Jun 01, 2005 at 06:00:28PM +0100, Simon Riggs wrote: > On Wed, 2005-06-01 at 11:31 -0400, Tom Lane wrote:
> > Perhaps it could work to use an ALTER TABLE command to flip the state. > > But I'm not really seeing the point compared to treating it as a COPY > > option. I do not believe that anyone needs this to work on individual > > INSERT commands --- if you are after max speed, why aren't you using > > COPY? And treating it as an ALTER property opens the possibility of > > forgetting to ALTER the table back to normal behavior, which would be > > a foot-gun of large caliber indeed :-( > > Oh no, not the foot gun again. I surrender. Sorry, what are you surrendering from/for/of/to? I think the proposal is doing a reasonable headways. So far we have - it is an option to COPY and CREATE TABLE AS, not GUC, not ALTER TABLE - it'd only work on empty tables - it'd only work it PITR is off - it needs to follow MVCC semantics, i.e. the tuples need to be written with the correct Xids - after the command is done, an fsync is applied to the table file(s) Another point that needs thought is what to do if the table has any indexes. Are operations on said indexes logged or not? Maybe we should just say that indexes are verbotten and the user needs to create them afterwards. -- Alvaro Herrera (<alvherre[a]surnet.cl>) "Las cosas son buenas o malas segun las hace nuestra opinión" (Lisias) ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend