Thread: Truncating table in PSQL reclaims hard disk?

Truncating table in PSQL reclaims hard disk?

From
Freeda Suing
Date:
Hi,

Does truncating a table automatically re-claim the hard disk or do I need to initiate vacuum after the truncate.

Thanks

Re: Truncating table in PSQL reclaims hard disk?

From
s d
Date:


On 24 August 2015 at 13:07, Freeda Suing <freeda.suing@gmail.com> wrote:
Hi,

Does truncating a table automatically re-claim the hard disk or do I need to initiate vacuum after the truncate.

Thanks

TRUNCATE quickly removes all rows from a set of tables. It has the same effect as an unqualified DELETE on each table, but since it does not actually scan the tables it is faster. Furthermore, it reclaims disk space immediately, rather than requiring a subsequent VACUUM operation. This is most useful on large tables.

Regards,
Sandor