Re: Can postgres create a file with physically continuous blocks. - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Can postgres create a file with physically continuous blocks.
Date
Msg-id 40FA905C-03B1-4341-A781-7F0250F8308D@nasby.net
Whole thread Raw
In response to Can postgres create a file with physically continuous blocks.  (flyusa2010 fly <flyusa2010@gmail.com>)
Responses Re: Can postgres create a file with physically continuous blocks.  (Robert Haas <robertmhaas@gmail.com>)
List 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
filewill 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
contiguousindex access may not be. 
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Extensions and custom_variable_classes (was: Extensions, patch v20 (bitrot fixes))
Next
From: Jim Nasby
Date:
Subject: Re: keeping a timestamp of the last stats reset (for a db, table and function)