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

BUG #2394: Multiple TRUNCATE within transaction

From: "Alexander Kirpa" <postgres(at)bilteks(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2394: Multiple TRUNCATE within transaction
Date: 2006-04-14 01:32:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2394
Logged by:          Alexander Kirpa
Email address:      postgres(at)bilteks(dot)com
PostgreSQL version: 8.1.3
Operating system:   FreeBSD 6.0
Description:        Multiple TRUNCATE within transaction

Within one transaction each 'TRUNCATE TABLE' - "generate" as minimum one
file: 1 for table plus one on each index.

In case of many truncate (10-100 thousands or more) within one transaction,
postgres receive serious performance problem for current operation (create
and delete 100K files in not to easy task for filesystem) and, in future,
some system wide (postgres) performance lost as result of big size (1-2MB in
my case) of database directory.

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.

Best regards,
 Alexander Kirpa


pgsql-bugs by date

Next:From: wangshjDate: 2006-04-14 06:30:10
Subject: BUG #2395: Can't get right type oid by PQftype.
Previous:From: Tom LaneDate: 2006-04-14 00:41:06
Subject: Re: Permission denied on fsync / Win32 (was right

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