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

From Lamar Owen
Subject Re: autocommit vs TRUNCATE et al
Date
Msg-id 200210192243.16899.lamar.owen@wgcr.org
Whole thread Raw
In response to Re: autocommit vs TRUNCATE et al  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: autocommit vs TRUNCATE et al  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: DBD::PG - any works to be compatile with 7.3 ?
Next
From: Bruce Momjian
Date:
Subject: Re: autocommit vs TRUNCATE et al