Re: Delete huge Table under XFS - Mailing list pgsql-performance

From Andreas Kretschmer
Subject Re: Delete huge Table under XFS
Date
Msg-id 357e7bd3-1b40-180c-14ce-7911229b5efb@a-kretschmer.de
Whole thread Raw
In response to Delete huge Table under XFS  (Joao Junior <jcoj2006@gmail.com>)
Responses Re: Delete huge Table under XFS
List pgsql-performance

Am 19.09.19 um 17:59 schrieb Joao Junior:
>
>
> I have a table that Is not being use anymore, I want to drop it.
> The table is huge, around 800GB and it has some index on it.
>
> When I execute the drop table command it goes very slow, I realised 
> that the problem is the filesystem.
> It seems that XFS doesn't handle well big files, there are some 
> discussion about it in some lists.

PG doesn't create one big file for this table, but about 800 files with 
1GB size each.

>
> I have to find a way do delete the table in chunks.

Why? If you want to delete all rows, just use TRUNCATE.


Regards, Andreas

-- 
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com




pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: comparing output of internal pg tables of referenced tables
Next
From: Luís Roberto Weck
Date:
Subject: Slow query on a one-tuple table