• Tom Lane's avatar
    Make TRUNCATE do truncate-in-place when processing a relation that was created · cab9a065
    Tom Lane authored
    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.
    cab9a065
heap.h 3.31 KB