pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedwhen datas filesystem is full how to do
4+ messages / 4 participants
[nested] [flat]
* when datas filesystem is full how to do
@ 2005-02-16 12:52 guly <gulyxxf@21cn.com>
0 siblings, 1 reply; 4+ messages in thread
From: guly @ 2005-02-16 12:52 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: when datas filesystem is full how to do
@ 2005-02-16 13:17 Geoffrey <esoteric@3times25.net>
parent: guly <gulyxxf@21cn.com>
0 siblings, 1 reply; 4+ messages in thread
From: Geoffrey @ 2005-02-16 13:17 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: when datas filesystem is full how to do
@ 2005-02-16 13:57 Morus Walter <morus.walter@tanto.de>
parent: Geoffrey <esoteric@3times25.net>
0 siblings, 1 reply; 4+ messages in thread
From: Morus Walter @ 2005-02-16 13:57 UTC (permalink / raw)
To: pgsql-admin
Geoffrey writes:
> 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.
>
I guess the problem is, that he doesn't want to stop the database.
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...
Presumably part of the data will remain on /usr/local but if the goal
is to provide sufficiant space that should not harm.
Of course that's assuming we speak of PG 8 here.
But I'd make sure first, that it's really the data and not unvacuumed
space or no longer needed WALs filling the disk.
For details see postgresqls excellent docs (I can say that, I'm also
just learning postgresql from the docs).
Note that I didn't test that.
HTH
Morus
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: when datas filesystem is full how to do
@ 2005-02-16 15:24 Tom Lane <tgl@sss.pgh.pa.us>
parent: Morus Walter <morus.walter@tanto.de>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2005-02-16 15:24 UTC (permalink / raw)
To: Morus Walter <morus.walter@tanto.de>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-02-16 15:24 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-16 12:52 when datas filesystem is full how to do guly <gulyxxf@21cn.com>
2005-02-16 13:17 ` Geoffrey <esoteric@3times25.net>
2005-02-16 13:57 ` Morus Walter <morus.walter@tanto.de>
2005-02-16 15:24 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox