On 9/4/15 7:04 AM, Thom Brown wrote:
But shouldn't we not be creating FSM or VM files when truncating?

Maybe, but even then you still need to create a bunch of new files (at least one for the table and one for each index), and AFAIK the first page in each file will be properly initialized, which means each file will be at least BLKSZ.

ISTM that the vacuum case is one we'd really want to avoid, though, as
it's trickier to work around the problem.

What might make sense is a special 'free up space NOW' mode that focuses only on attempting to truncate the relation, because if you can't actually shrink the heap you're not going to make any progress.

But since none of this will help at all in the default case where WAL is on the same filesystem as the data, I don't know that it's worth it.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to