[postgis-users] No Space left on device.

Chander Ganesan chander at otg-nc.com
Thu Dec 13 09:28:43 PST 2007


Richard Heimann [C] wrote:
>
> This question is more to do with PostgreSQL then PostGIS but I've 
> always gotten good response on this forum and so I'm going back to the 
> well.
>
>  
>
> After a recent load, I received the following error, "...No space left 
> on device SQL State 53100 Hint: Check free Disk Space." This error is 
> fairly self-explanatory but I don't know how to approach the problem. 
> In SQL server I would simple stop autogrowth on a file group, create a 
> new file group on a larger partition and be done or alternately 
> attached/detach the database onto new partition and begin work again. 
> My point is there are several ways but Im new to PostrgeSQL and Im 
> curious - what's the best practice. I believe all the data is in the 
> installation directory <data> folder. Can I simply move this folder 
> and somehow reattach? Thanks in advance, Rich
>

You have two "good" options to correct this problem:
    - Use Paul's suggestion (what you mention above) to move your entire 
database to a different drive/partition.  This solution is good until 
that partition runs out of space, then you have to move it again ;-)   I 
would recommend not changing your postgresql.conf file to reflect the 
new directory - rather - modify your startup scripts so pg_ctl is called 
with the appropriate directory argument...
    - Use PostgreSQL's Tablespace mechanism to spread your data across 
multiple partitions.  This is generally the preferred method, since it 
allows you to leverage multiple drives/partitions for the storage of 
data.  The URL below describes how to do this:
http://www.postgresql.org/docs/8.2/static/manage-ag-tablespaces.html

Tablespaces were introduced in PostgreSQL 8.0.  If you are using an 
older version of PostgreSQL then you'd have to resort to some different 
techniques to achieve a similar result.

-- 
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC  27560
919-463-0999/877-258-8987
http://www.otg-nc.com
Expert PostgreSQL Training

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20071213/c4d55f03/attachment.html>


More information about the postgis-users mailing list