Re: File Fragmentation

From: "jg" <jg(at)rilk(dot)com>
To: "Vick Khera" <vivek(at)khera(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: File Fragmentation
Date: 2013-03-20 13:53:39
Message-ID: 5a93-5149bf80-3-6b8b4580@16493649
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

> It sounds like you are using partitioned tables. your partitions should be
> divided up such that they help optimize your queries. that is, minimize the
> number of partitions you need to scan for any given query.
>
> That said, try to make is so that this cleanup script purges whole
> partitions, not just deleting some rows. That way new data will fill in
> space without fragmentation.

The rotated script, as explained, just drops tables and creates empty ones.

There are only COPY and SELECT in this database.

The problem seems that the IO pattern creates higly fragmented files.
I have some files with 1,440 fragments a day.

JG

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2013-03-20 14:11:58 Re: "Leaking" disk space on FreeBSD servers
Previous Message Alexander Farber 2013-03-20 13:47:01 Re: Matching uppercased russian words (\x0410-\x042F) in UTF8 database 8.4.13