Re: PostgreSQL win32 fragmentation issue

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostgreSQL win32 fragmentation issue
Date: 2006-12-02 23:31:37
Message-ID: 45720CD9.70809@paradise.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Kirkwood wrote:
> Andrew Dunstan wrote:
>
>>
>> (I should have thought a single file DB would be MORE liable to
>> fragmentation, BTW).
>>
>
> The likes of Oracle/SQLServer preallocate the files(s) at database
> creation time, so there will be little or no initial fragmentation.
>

... To clarify - preallocated with free space in the files :-) ...

A related point comes to mind, consider the single "tablespace" file for
example: It may have no fragmentation from a *file* perspective, but
supposing you have several busy relations being inserted or updated then
pages (or groups of pages) for these could be "fragmented" throughout
the tablespace file. This can reduce scan performance, since seeks are
now involved to "jump over" the page chunks for relations you are not
interested in.

Some Oracle DBA's I knew used to regularly export|rebuild|import their
databases precisely to "defragment" their relation|file page distribution.

I'm not trying to say that we don't have an issue, just pointing out
that preallocated files are not necessarily a complete or ideal solution.

Cheers

Mark

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas H. 2006-12-02 23:58:46 Re: PostgreSQL win32 fragmentation issue
Previous Message Mark Kirkwood 2006-12-02 23:09:18 Re: PostgreSQL win32 fragmentation issue