From: | Jean-Christophe Weis <jcweis(at)melix(dot)net> |
---|---|
To: | pgsql-fr-generale(at)postgresql(dot)org |
Subject: | ERROR: Postmaster environment variable 'PGDATA2' not set |
Date: | 2004-06-30 18:47:26 |
Message-ID: | 20040630184726.GA3152@max.my.domain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-fr-generale |
Salut la liste,
J'ai integre depuis peu le groupe de traduction de la documentation de
PostgreSQL.
Comme je ne comprenais pas la section 18.5 (Server Administration > Managing
Databases > Alternative Locations) que je dois traduire, j'ai voulu essayer
les manips, mais sans succes.
Mon probleme est le suivant:
J'ai une debian woody, <3.0r1>. Ma version de PostgreSQL est <7.2.1-2>.
J'ai cree un repertoire pour une nouvelle aire de stockage de donnees, dans
mon repertoire d'utilisateur lambda, avec les permissions qui vont bien:
| root# ls -ld /home/jc/
| drwxr-xr-x 29 jc jc 4096 Jun 29 19:18 /home/jc/
| root# ls -ld /home/jc/postgres
| drwx------ 3 postgres postgres 4096 Jun 29 19:59 /home/jc/postgres/
Le serveur a l'arret, je definis et j'exporte une variable nommee PGDATA2:
| root# PGDATA2=/home/jc/postgres/data
| root# export PGDATA2
Je cree la nouvelle aire de stockage sous l'identite systeme postgres:
| root# su postgres
| postgres$ /usr/lib/postgresql/bin/initlocation PGDATA2
| The location will be initialized with username "postgres".
| This user will own all the files and must also own the server process.
|
| Creating directory /home/jc/postgres/data
| Creating directory /home/jc/postgres/data/base
|
| initlocation is complete.
| You can now create a database using
| CREATE DATABASE <name> WITH LOCATION = 'PGDATA2'
| in SQL, or
| createdb <name> -D 'PGDATA2'
| from the shell.
Apparemment tout va bien, je relance le serveur:
| postgres$ exit
| root# /etc/init.d/postgresql start
| ...
Mais quand j'essaie de creer une base de donnees dans la nouvelle aire sous
l'identite systeme postgres, ca ne marche pas:
| root# su postgres
| postgres$ createdb testdb -D 'PGDATA2'
| ERROR: Postmaster environment variable 'PGDATA2' not set
| createdb: database creation failed
| postgres$ createdb testdb -D PGDATA2
| ERROR: Postmaster environment variable 'PGDATA2' not set
| createdb: database creation failed
| postgres$ createdb testdb -D $PGDATA2
| ERROR: Absolute paths are not allowed as database locations
| createdb: database creation failed
Le probleme semble etre que je n'arrive pas a passer la variable PGDATA2 dans
l'environnement du serveur... Pourtant je l'ai bien definie et exportee dans
le shell root d'ou je lance le serveur... Une idee?
Merci, JC Weis.
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno | 2004-06-30 20:10:25 | Re: ERROR: Postmaster environment variable |
Previous Message | Jean-Max Reymond | 2004-06-29 15:37:32 | Re: salut je vient te proposer quelque chose |