By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,692 Members | 1,998 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,692 IT Pros & Developers. It's quick & easy.

Moving the database from a filesystem to another

P: n/a
Hi All,
one of my customers has a Postgres 7.2.3 DB on an RH7.1 box. Running df it
seems that the DB is not on the appropriate filesystem.

/dev/md1 5040352 2562316 2221992 54% /
/dev/md0 100020 8989 85867 10% /boot
/dev/md2 28831612 9800 27357244 1% /data

I suppose md2 was planned for storing the database, but it is on md1
($PGDATA = /var/lib/pgsql/data). Am I right?

md1 is about fulling up in some months, so I think it should be a good idea
to move the store to md2. How can I do this?
Is it enough to copy/move the directory /var/lib/pgsql/data to eg.
/data/pgsql/data and set $PGDATA to that directory?

Thank you,
-- Egyd Csaba
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Egyd Csaba <cs*****@vnet.hu> writes:
md1 is about fulling up in some months, so I think it should be a good idea
to move the store to md2. How can I do this?
Is it enough to copy/move the directory /var/lib/pgsql/data to eg.
/data/pgsql/data and set $PGDATA to that directory?


Yes, this is pretty much all you need to do. Just make sure you
preserve the ownership and permissions when you copy the data over...

-Doug

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #2

P: n/a
=?iso-8859-2?Q?Egy=FCd_Csaba?= <cs*****@vnet.hu> writes:
Is it enough to copy/move the directory /var/lib/pgsql/data to eg.
/data/pgsql/data and set $PGDATA to that directory?


Yes. Shut down postmaster *before* starting the move, though.

regards, tom lane

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

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.