Re: Re: Idea: recycle WAL segments, don't delete/recreate 'em

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gunnar Rønning <gunnar(at)polygnosis(dot)com>
Cc: "Frank Ch(dot) Eigler" <fche(at)redhat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: Idea: recycle WAL segments, don't delete/recreate 'em
Date: 2001-07-18 15:35:40
Message-ID: 200107181535.f6IFZeJ11647@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> * Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
>
> | Most Unix filesystems will not allocate disk blocks until you write in
> | them. If you just seek out past end-of-file, the file pointer is moved
> | but the blocks are unallocated. This is how 'ls' can show a 1gb file
> | that only uses 4k of disk space.
>
> Does this imply that we could get a performance gain by preallocating space
> for indexes and data itself as well ? I've seen that other database products
> have a setup step where you have to specify the size of the database.
>
> Or does PostgreSQL do any other tricks to prevent fragmentation of data ?

If we stored all our tables in one file that would be needed. Since we
use the OS to do the defragmenting, I don't think it is an issue. We do
allocate in 8k chunks to allow the OS to allocate full filesystem blocks
already. Not sure if preallocating even more would help.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-07-18 15:38:24 Re: pg_depend
Previous Message Tom Lane 2001-07-18 15:31:06 Re: pg_depend