Re: How to move tables in another physial place - Mailing list pgsql-general

From Ron Johnson
Subject Re: How to move tables in another physial place
Date
Msg-id 4653359D.8090803@cox.net
Whole thread Raw
In response to Re: How to move tables in another physial place  (Michelle Konzack <linux4michelle@freenet.de>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/22/07 12:58, Michelle Konzack wrote:
> Am 2007-05-22 12:45:23, schrieb Ron Johnson:
>> Your subject says "physial place", but then you ask about moving a
>> table to another partition.
>>
>> Since partitions are sub-sections of tables, I don't understand what
>> you are asking.
>
> :-)
>
> INSIDE the postgresql I use table partitioning but the whole database
> is on ONE PHYSICAL partition (/dev/sdb1) in the moment.
>
> I know tablespace and want to move parts of the Maintable (which is
> cutted down in many smaler parts) on another PYSIACAL partitonon of
> /dev/sdc1, /dev/sdd1 and /dev/sde1 to reduce the seeks on the drives.
>
> But since the database IS on ONE PYSIACAL partiton I do not know,
> HOW TO MOVE some of the smaller tables (without stoping the PostgreSQL
> from operating since it is needed 24/7)

Since PostgreSQL doesn't use raw partitions, your database can't
"own" it.  (Although, obviously, Postgres files might be the only
ones on sdb1.)

Is Maintable composed of smaller tables?

Anyway, this is what you need:
http://www.postgresql.org/docs/8.2/interactive/sql-altertable.html
ALTER TABLE foo SET TABLESPACE bar;


- --
Ron Johnson, Jr.
Jefferson LA  USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGUzWdS9HxQb37XmcRAoSEAKDuKTJi/yFuQcVdWKKzVTPzzJMs4ACfUqzM
Rpd+Xf4/2o1b6mo5xgm8AXQ=
=ASU2
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: swap storm created by 8.2.3
Next
From: Robert Fitzpatrick
Date:
Subject: Re: Permance issues with migrated db