Re: autocommit vs TRUNCATE et al

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: autocommit vs TRUNCATE et al
Date: 2002-10-20 02:51:12
Message-ID: 200210200251.g9K2pCO22653@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-10-20 02:56:49 New SET/autocommit problem
Previous Message Lamar Owen 2002-10-20 02:43:16 Re: autocommit vs TRUNCATE et al