Re: Can postgres create a file with physically continuous blocks.

From: Jim Nasby <jim(at)nasby(dot)net>
To: flyusa2010 fly <flyusa2010(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Can postgres create a file with physically continuous blocks.
Date: 2010-12-19 18:10:35
Message-ID: 40FA905C-03B1-4341-A781-7F0250F8308D@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Dec 19, 2010, at 1:10 AM, flyusa2010 fly wrote:
> Does postgres make an effort to create a file with physically continuous blocks?

AFAIK all files are expanded as needed. I don't think there's any flags you can pass to the filesystem to tell it "this file will eventually be 1GB in size". So, we're basically at the mercy of the FS to try and keep things contiguous.

BTW, it's worse with btree indexes; they end up non-sequential inside the file anyway, so even if the file is contiguous index access may not be.
--
Jim C. Nasby, Database Architect jim(at)nasby(dot)net
512.569.9461 (cell) http://jim.nasby.net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2010-12-19 18:13:49 Re: keeping a timestamp of the last stats reset (for a db, table and function)
Previous Message Robert Haas 2010-12-19 17:55:38 Re: Extensions and custom_variable_classes (was: Extensions, patch v20 (bitrot fixes))