Re: autocommit vs TRUNCATE et al - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: autocommit vs TRUNCATE et al
Date
Msg-id 200210200251.g9K2pCO22653@candle.pha.pa.us
Whole thread Raw
In response to Re: autocommit vs TRUNCATE et al  (Lamar Owen <lamar.owen@wgcr.org>)
List pgsql-hackers
Added to TODO:
* Make a transaction-safe TRUNCATE

---------------------------------------------------------------------------

Lamar Owen wrote:
> On Friday 18 October 2002 11:25 pm, Tom Lane wrote:
> > Gavin Sherry <swm@linuxworld.com.au> writes:
> > > On Fri, 18 Oct 2002, Tom Lane wrote:
> > >> Anyone see a way out of this catch-22?  If not, which is the least
> > >> bad alternative?
> 
> > > Ultimately, fix TRUNCATE to be transaction safe. This is non-trivial,
> > > I know :-).
> 
> > I was about to say that the entire *point* of TRUNCATE is to be
> > transaction-unsafe ;-)
> 
> I actually was considering using a transaction-safe TRUNCATE in an application 
> involving daily imports of 170MB of data into a set of linked tables.  Since 
> the import takes a finite amount of time, it would be nice to have the 
> previous data available while the new is being imported.  And TRUNCATE is 
> significantly faster than DELETE over 170MB of data.
> -- 
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Lamar Owen
Date:
Subject: Re: autocommit vs TRUNCATE et al
Next
From: Bruce Momjian
Date:
Subject: New SET/autocommit problem