Re: File Fragmentation - Mailing list pgsql-general

From Vick Khera
Subject Re: File Fragmentation
Date
Msg-id CALd+dcdqsndDuQ9iOBvd__2yq9u1=PZsz2PJJh4cv8MTwOPVhA@mail.gmail.com
Whole thread Raw
In response to File Fragmentation  ("jg" <jg@rilk.com>)
Responses Re: File Fragmentation
List pgsql-general

On Wed, Mar 20, 2013 at 7:13 AM, jg <jg@rilk.com> wrote:
Now, there is a partition rotation script, that suppress old tables when some size limit happens.
Let suppose, that this script runs and suppress only one table qith few days of data, then recreates a new empty one.

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.

pgsql-general by date:

Previous
From: Achilleas Mantzios
Date:
Subject: Re: "Leaking" disk space on FreeBSD servers
Next
From: Alexander Farber
Date:
Subject: Re: Matching uppercased russian words (\x0410-\x042F) in UTF8 database 8.4.13