Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4676F4760AF for ; Thu, 30 Jan 2003 07:32:06 -0500 (EST) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by postgresql.org (Postfix) with ESMTP id 64737476051 for ; Thu, 30 Jan 2003 07:32:05 -0500 (EST) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 18eDrQ-0004zJ-0d; Thu, 30 Jan 2003 12:32:04 +0000 Received: from localhost ([127.0.0.1] ident=olly) by linda.lfix.co.uk with esmtp (Exim 3.36 #1 (Debian)) id 18eDrQ-0000gK-00; Thu, 30 Jan 2003 12:32:04 +0000 Subject: Re: Database Management Setup From: Oliver Elphick To: Aris wendy Cc: pgsql-admin@postgresql.org In-Reply-To: <200301301111.03637.aris_postgre@telkom.net> References: <200301301111.03637.aris_postgre@telkom.net> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1043929923.1112.194.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 30 Jan 2003 12:32:03 +0000 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/335 X-Sequence-Number: 7177 On Thu, 2003-01-30 at 04:11, Aris wendy wrote: > I am a new comer in this millis. Can you help me how to configure the > postgreSQL server which has some databases. I mean 5 databses is spread to > different hardisk. For example a_db to hda1, b_db to hdb1, etc....... You can use symbolic links, if your operating system allows them. 1. For safety, make a full backup with pg_dumpall. 2. Identify the database directories -- they are named by the oid of the database in pg_databases: template1=# select datname, oid from pg_database; datname | oid ----------------+--------- accounts | 16983 comanagers | 1063179 template1 | 1 ... $ sudo ls $PGDATA/base 1 1063179 16983 ... 3. Shut down the postmaster. 4. Move the relevant directories from $PGDATA/base to the desired locations on the other disks -- their parent directories should have the same ownership and permissions as $PGDATA. 5. In $PGDATA/base, make symbolic links to the moved directories. PostgreSQL should notice no difference in the structure. 6. Restart the postmaster. If you destroy the database structure and recreate it by restoring from a full dump, the symbolic link structure will not be restored, since PostgreSQL knows nothing about it. It will have to be maintained manually. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "The Lord knoweth how to deliver the godly out of temptations, and to reserve the unjust unto the day of judgment to be punished;" II Peter 2:9