Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 5B5F09FB2F6 for ; Tue, 22 May 2007 01:38:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 49501-06 for ; Tue, 22 May 2007 01:38:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from bay0-omc2-s19.bay0.hotmail.com (bay0-omc2-s19.bay0.hotmail.com [65.54.246.155]) by postgresql.org (Postfix) with ESMTP id 607779FB2DA for ; Tue, 22 May 2007 01:38:47 -0300 (ADT) Received: from hotmail.com ([207.46.11.98]) by bay0-omc2-s19.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Mon, 21 May 2007 21:38:45 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 21 May 2007 21:38:45 -0700 Message-ID: Received: from 207.46.11.123 by by123fd.bay123.hotmail.msn.com with HTTP; Tue, 22 May 2007 04:38:41 GMT X-Originating-IP: [59.160.193.34] X-Originating-Email: [aroravishal22@hotmail.com] X-Sender: aroravishal22@hotmail.com In-Reply-To: From: "Vishal Arora" To: indolinux.geeks@gmail.com, stellr@cns.vt.edu Cc: pgsql-admin@postgresql.org Subject: Re: Moving data directory Date: Tue, 22 May 2007 04:38:41 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 22 May 2007 04:38:45.0636 (UTC) FILETIME=[15304440:01C79C2B] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/217 X-Sequence-Number: 25537 Each time you start postgres server using pg_ctl you have to mention the data directory location using -D option. Alternatively you can specify in the data_directory parameter of postgresql.conf file. - vishal >From: "Linux Geeks" >To: "Ray Stell" >CC: pgsql-admin@postgresql.org >Subject: Re: [ADMIN] Moving data directory >Date: Tue, 22 May 2007 10:45:17 +0700 > >Hi Ray, > >Sorry for late reply. Yes, I have tested your instructions and working >well. The think is now I need to configure so that it will always >automically start with the new location. > >Thank you very much for the detailed instructions, really appreciated it. > >Regards, > >Dino > >On 5/14/07, Ray Stell wrote: >>On Sat, May 12, 2007 at 11:47:46PM +0700, Linux Geeks wrote: >> > I'm very new to postgresql and would like to move my data directory to >> > another partition in Ubuntu. >> >> >>I don't think there is anything internal to pg that locks the data >>location. Just tell postmaster where you move it to. Shut down the >>postmaster and move it and start it with the -D flag pointing to the >>new location: >> >>$ pg_ctl start -D /var/pgsql/data >>server starting >> >>$ psql -p 5437 testdb jira >>Password for user jira: >>Welcome to psql 8.2.3, the PostgreSQL interactive terminal. >> >>Type: \copyright for distribution terms >> \h for help with SQL commands >> \? for help with psql commands >> \g or terminate with semicolon to execute query >> \q to quit >> >>testdb=> \q >> >>pg_ctl stop -D /var/pgsql/data >>waiting for server to shut down....,7222,,2007-05-13 19:52:06.675 >>EDT,,1,,, LOG: logger shutting down >> done >>server stopped >> >>$ mv /var/pgsql/data-move-test /var/pgsql/data >> >>$ pg_ctl start -D /var/pgsql/data-move-test >>server starting >> >>$ psql -p 5437 testdb jira >>Password for user jira: >>Welcome to psql 8.2.3, the PostgreSQL interactive terminal. >> >>Type: \copyright for distribution terms >> \h for help with SQL commands >> \? for help with psql commands >> \g or terminate with semicolon to execute query >> \q to quit >> >>testdb=> \q >> >>pg_ctl stop -D /var/pgsql/data-move-test >>waiting for server to shut down....,7245,,2007-05-13 19:55:00.944 >>EDT,,1,,, LOG: logger shutting down >> done >>server stopped >> >>$ mv /var/pgsql/data-move-test /var/pgsql/data >> >>$ pg_ctl start -D /var/pgsql/data >>server starting >> >>$ psql -p 5437 testdb jira >>Password for user jira: >>Welcome to psql 8.2.3, the PostgreSQL interactive terminal. >> >>Type: \copyright for distribution terms >> \h for help with SQL commands >> \? for help with psql commands >> \g or terminate with semicolon to execute query >> \q to quit >> >>testdb=> \q >> >>-- >> Lost time is when we learn nothing from the experiences of life. Time >> gained is when we grow to have a wisdom that is tested in the reality of >>life. >> > > >-- >To Analyze Is To Know Batte Field, Differ from Battle Itself > >---------------------------(end of broadcast)--------------------------- >TIP 5: don't forget to increase your free space map settings _________________________________________________________________ More photos, more messages, more storage—get 2GB with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507