Re: Truncating table in PSQL reclaims hard disk? - Mailing list pgsql-novice

From s d
Subject Re: Truncating table in PSQL reclaims hard disk?
Date
Msg-id CAKyoTgbhKDDAfecyxvBgOGaGaaYfPRP+a8xAprx6NK-N1PNR7g@mail.gmail.com
Whole thread Raw
In response to Truncating table in PSQL reclaims hard disk?  (Freeda Suing <freeda.suing@gmail.com>)
List pgsql-novice


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

pgsql-novice by date:

Previous
From: Freeda Suing
Date:
Subject: Truncating table in PSQL reclaims hard disk?
Next
From: Daniel Smedegaard Buus
Date:
Subject: Triggers on replicated (BDR) data