Re: autocommit vs TRUNCATE et al

From: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: autocommit vs TRUNCATE et al
Date: 2002-10-20 02:43:16
Message-ID: 200210192243.16899.lamar.owen@wgcr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Friday 18 October 2002 11:25 pm, Tom Lane wrote:
> Gavin Sherry <swm(at)linuxworld(dot)com(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-10-20 02:51:12 Re: autocommit vs TRUNCATE et al
Previous Message Bruce Momjian 2002-10-20 02:42:07 Re: DBD::PG - any works to be compatile with 7.3 ?