Обсуждение: Change of the data directory on Ubuntu 7.04

Поиск
Список
Период
Сортировка

Change of the data directory on Ubuntu 7.04

От
Marek Szczypek
Дата:
Hi All,

   I have a question - what is the procedure, to change the default
location of the data directory of PostgreSQL database? I would like
the data to be stored in /dane/postgresql/data instead of the Ubuntu's
default location (/var/lib/postgresql/). Is it enough just to run
initdb -D /dane/postgresq/data, and set in .bashrc file of the
postgres user PGDATA variable to /dane/postgresql/data, and maybe to
move configuration files to /etc/postgresql/8.2/main (just as ubuntu
does when installing the database)? Thanks in advance for answers and
hints :-)

Cheers,

Marek

Re: Change of the data directory on Ubuntu 7.04

От
"Leonel Nunez"
Дата:
> Hi All,
>
>    I have a question - what is the procedure, to change the default
> location of the data directory of PostgreSQL database? I would like
> the data to be stored in /dane/postgresql/data instead of the Ubuntu's
> default location (/var/lib/postgresql/). Is it enough just to run
> initdb -D /dane/postgresq/data, and set in .bashrc file of the
> postgres user PGDATA variable to /dane/postgresql/data, and maybe to
> move configuration files to /etc/postgresql/8.2/main (just as ubuntu
> does when installing the database)? Thanks in advance for answers and
> hints :-)
>
> Cheers,
>
> Marek
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

you can leave the instalation as is , and  create a tablespace in
/dane/postgresql  and create your databases in  the NEW tablespace

take a look at :
http://www.postgresql.org/docs/8.2/static/manage-ag-tablespaces.html


Leonel




Re: Change of the data directory on Ubuntu 7.04

От
Marek Szczypek
Дата:
On 20 Gru, 16:37, lis...@enelserver.com ("Leonel Nunez") wrote:

> you can leave the instalation as is , and  create a tablespace in
> /dane/postgresql  and create your databases in  the NEW tablespace
>
> take a look at :http://www.postgresql.org/docs/8.2/static/manage-ag-tablespaces.html
>
> Leonel

Hi Leonel,

   I have to admit, that I should start to use the RTFM rule ;-)
Thanks for help! :-)

Cheers,
Markacy