pgsql: Make TRUNCATE do truncate-in-place when processing a relation - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Make TRUNCATE do truncate-in-place when processing a relation
Date
Msg-id 20090823192341.368B075331E@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Make TRUNCATE do truncate-in-place when processing a relation that was created
or previously truncated in the current (sub)transaction.  This is safe since
if the (sub)transaction later rolls back, we'd just discard the rel's current
physical file anyway.  This avoids unreasonable growth in the number of
transient files when a relation is repeatedly truncated.  Per a performance
gripe a couple weeks ago from Todd Cook.

Modified Files:
--------------
    pgsql/src/backend/catalog:
        heap.c (r1.357 -> r1.358)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/heap.c?r1=1.357&r2=1.358)
    pgsql/src/backend/commands:
        tablecmds.c (r1.297 -> r1.298)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.297&r2=1.298)
    pgsql/src/include/catalog:
        heap.h (r1.91 -> r1.92)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/heap.h?r1=1.91&r2=1.92)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Tweak ExecIndexEvalRuntimeKeys to forcibly detoast any toasted
Next
From: fxjr@pgfoundry.org (User Fxjr)
Date:
Subject: npgsql - Npgsql2: [#1010668] Npgsql ConnectionStringBuilder provides no