[postgis-users] Rasters -- disk paging

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Fri Sep 30 03:51:39 PDT 2005


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Gregory S. Williamson
> Sent: 29 September 2005 22:26
> To: PostGIS Users Discussion; PostGIS Users Discussion
> Subject: RE: [postgis-users] Rasters -- disk paging
> 
> 
> 
> Without addressing any of the worthwhile questions below, let 
> me add a foolish question --
> 
> Is it possible to adjust the amount of data transferred in 
> one chunk in postgres ?
> 
> I've used Informix systems with BLOBs in which we could 
> change the page size from 2k (standard for most Informix 
> versions) -- in our case we knew that 95% of our TIFFs would 
> fit in a 20k blob, so we defined the BLOBs for that 
> application to use that size -- made it very efficient in 
> that one read / write operation involved only one disk 
> operation, rather than multiple 2k transfers. (of course that 
> other 5% of images waste some disk space and took 2 
> transfers...). With Informix "raw" storage we found this to 
> be at least as fast as standard file system storage of TIFFs.
> 
> Or is this irrelevant given postgres' underlying data storage 
> (e.g. TOAST etc.) ?
> 
> Greg W.


Hi Greg,

TOAST is effectively an 'out of line' storage mechanism for objects which
don't fit inside the native 8k page size. What happens normally is that
objects larger than 2k are automatically compressed using gzip and placed
inside the TOAST table. Hence access to objects larger than this will need
to pull in the TOAST data as part of a row query.

It is however possible for an individual datatype to disable compression
with TOAST (so large objects are stored uncompressed) or disable it
completely so that all objects must be less than the 8k page size. Of
course, the page size is a compile time constant and so you can recompile
PostgreSQL with a larger value should you require this for performance.


Kind regards,

Mark.

------------------------
WebBased Ltd
South West Technology Centre
Tamar Science Park
Plymouth
PL6 8BT 

T: +44 (0)1752 791021
F: +44 (0)1752 791023
W: http://www.webbased.co.uk





More information about the postgis-users mailing list