Skip site navigation (1) Skip section navigation (2)

Re: BUG #2394: Multiple TRUNCATE within transaction

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alexander Kirpa" <postgres(at)bilteks(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2394: Multiple TRUNCATE within transaction
Date: 2006-04-15 16:17:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"Alexander Kirpa" <postgres(at)bilteks(dot)com> writes:
> In case of many truncate (10-100 thousands or more) within one transaction,
> postgres receive serious performance problem for current operation (create

Why in the world are you doing that, and why do you think we need to
optimize that case?  We don't have infinite manpower, so if you
want this case optimized you had better explain why it deserves
consideration ahead of the long list of other problems ...

> IMHO, need create new file only for first of truncate command. For 2, 3, ...
> 'truncate table' within one transaction need simple truncate self file(s),
> this also improve performance especially in case using of temporary tables
> by avoid write temporary date on disk.

This "simple" fix is pretty debatable anyway because of the existence
of intra-transaction MVCC rules.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2006-04-15 16:19:07
Subject: Re: BUG #2395: Can't get right type oid by PQftype.
Previous:From: Volkan YAZICIDate: 2006-04-15 15:32:58
Subject: Re: BUG #2395: Can't get right type oid by PQftype.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group