Unix Technical Forum

when datas filesystem is full how to do

This is a discussion on when datas filesystem is full how to do within the pgsql Admins forums, part of the PostgreSQL category; --> I have installed postgresql in /usr/local filesystem on RH Linux. But Running for two months,the datas are growing too ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:23 AM
guly
 
Posts: n/a
Default when datas filesystem is full how to do

I have installed postgresql in /usr/local filesystem on RH Linux. But Running for two months,the datas are growing too fast.There is no enough space at /usr/local filesystem. I want to make this filesystem bigger or move the database to another
filesystem and don't stop the database.Someone can tell me how to do that?Thanks.

jovi



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:23 AM
Tom Lane
 
Posts: n/a
Default Re: when datas filesystem is full how to do

Morus Walter <morus.walter@tanto.de> writes:
> I guess the problem is, that he doesn't want to stop the database.


Yeah ... I'm afraid that's an impractical goal.

> I'd rather suggest to look into tablespaces.
> Create a new tablespace on some other filesystem and move the contents
> of the database by using ALTER TABLE/INDEX SET TABLESPACE...


Although the postmaster may stay up, this would still involve taking
exclusive locks on large tables for long enough to copy them to another
disk. That would probably knock out his application just as effectively
as a full database shutdown. And of course it's not even an option
unless he's running PG 8.0.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 12:23 AM
Geoffrey
 
Posts: n/a
Default Re: when datas filesystem is full how to do

guly wrote:
> I have installed postgresql in /usr/local filesystem on RH Linux. But Running for two months,the datas are growing too fast.There is no enough space at /usr/local filesystem. I want to make this filesystem bigger or move the database to another
> filesystem and don't stop the database.Someone can tell me how to do that?Thanks.


I don't know about all the aspects regarding Postgresql, but you could
create another partition, either from current free space, or by adding
another drive and migrate /usr/local to it.

Create the new space (format existing unused space, add a new drive)
mount the new space (/tmpmnt or something)
Boot to single user, insure your postgresql database is not active.
Copy /usr/local to /tmpmnt
Modify /etc/fstab to mount /usr/local on /tmpmnt

Once you verify this all works, you will need to reboot to single user,
unmount your new /usr/local so you can remove the old stuff that was in
the old /usr/local partition/directory in order to recover that space.

Others may shoot this down because of issues with Postgresql I'm not
aware of, but I do this all the time to move stuff around or create new
space.

--
Until later, Geoffrey

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:38 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com