IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Installation PostgreSQL Discussion :

Organisation des fichiers de Postgresql Debian


Sujet :

Installation PostgreSQL

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Mars 2009
    Messages
    33
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2009
    Messages : 33
    Points : 18
    Points
    18
    Par défaut Organisation des fichiers de Postgresql Debian
    Bonjour,
    Après l'installation de postgresql sur une distrib Debian (Lenny), via apt-get. Tout fonctionne bien et on retrouve les fichiers suivants sur le serveur :
    socrate:/etc/postgresql/8.3/main# ll /etc/postgresql/8.3/main/
    total 44
    drwxr-xr-x 2 postgres postgres 4096 aoû 12 16:28 .
    drwxr-xr-x 3 root root 4096 aoû 7 09:17 ..
    -rw-r--r-- 1 postgres postgres 316 aoû 7 09:17 environment
    -rw-r----- 1 postgres postgres 3669 aoû 7 18:11 pg_hba.conf
    -rw-r----- 1 postgres postgres 1460 aoû 7 09:17 pg_ident.conf
    -rw-r--r-- 1 postgres postgres 16683 aoû 7 17:46 postgresql.conf
    -rw-r--r-- 1 postgres postgres 378 aoû 7 09:17 start.conf

    socrate:/etc/postgresql/8.3/main# ll /etc/postgresql-common/
    total 24
    drwxr-xr-x 3 root root 4096 aoû 7 09:17 .
    drwxr-xr-x 72 root root 4096 aoû 12 16:48 ..
    -rw-r--r-- 1 root root 1999 fév 6 2009 autovacuum.conf
    drwxr-xr-x 2 root root 4096 fév 6 2009 pg_upgradecluster.d
    -rw-r--r-- 1 root root 540 aoû 7 09:17 root.crt
    -rw-r--r-- 1 root root 1135 fév 6 2009 user_clusters


    socrate:/etc/postgresql/8.3/main# ll /var/lib/postgresql/8.3/main/
    total 52
    drwx------ 10 postgres postgres 4096 aoû 7 18:14 .
    drwxr-xr-x 3 root root 4096 aoû 7 09:17 ..
    drwx------ 5 postgres postgres 4096 aoû 7 09:17 base
    drwx------ 2 postgres postgres 4096 aoû 7 18:14 global
    drwx------ 2 postgres postgres 4096 aoû 7 09:17 pg_clog
    drwx------ 4 postgres postgres 4096 aoû 7 09:17 pg_multixact
    drwx------ 2 postgres postgres 4096 aoû 7 09:17 pg_subtrans
    drwx------ 2 postgres postgres 4096 aoû 7 09:17 pg_tblspc
    drwx------ 2 postgres postgres 4096 aoû 7 09:17 pg_twophase
    -rw------- 1 postgres postgres 4 aoû 7 09:17 PG_VERSION
    drwx------ 3 postgres postgres 4096 aoû 7 09:17 pg_xlog
    -rw------- 1 postgres postgres 133 aoû 7 18:13 postmaster.opts
    -rw-r--r-- 1 root root 540 aoû 7 09:17 root.crt

    Plus des fichiers dans /usr/lib/postgresql/8.3/bin/, /usr/bin/ et /usr/sbin/
    Jusque là ok.

    Ensuite j'ai voulu créer un nouveau cluster via
    # initdb -D /serveur/data/pgsql/

    et du coup il m'a créer le dossier suivant avec les fichiers ci-dessous :

    socrate:/etc/postgresql/8.3/main# ll /serveur/data/pgsql/
    total 76
    drwx------ 10 postgres root 4096 aoû 12 16:31 .
    drwxr-xr-x 4 root root 4096 aoû 7 10:34 ..
    drwx------ 5 postgres postgres 4096 aoû 7 17:13 base
    drwx------ 2 postgres postgres 4096 aoû 12 16:31 global
    drwx------ 2 postgres postgres 4096 aoû 7 17:13 pg_clog
    -rw------- 1 postgres postgres 3473 aoû 12 16:30 pg_hba.conf
    -rw------- 1 postgres postgres 1460 aoû 7 17:13 pg_ident.conf
    drwx------ 4 postgres postgres 4096 aoû 7 17:13 pg_multixact
    drwx------ 2 postgres postgres 4096 aoû 7 17:13 pg_subtrans
    drwx------ 2 postgres postgres 4096 aoû 7 17:13 pg_tblspc
    drwx------ 2 postgres postgres 4096 aoû 7 17:13 pg_twophase
    -rw------- 1 postgres postgres 4 aoû 7 17:13 PG_VERSION
    drwx------ 3 postgres postgres 4096 aoû 7 17:13 pg_xlog
    -rw------- 1 postgres postgres 16591 aoû 12 16:28 postgresql.conf
    -rw------- 1 postgres postgres 64 aoû 12 16:30 postmaster.opts
    D'où mes questions :
    - On retrouve des fichiers de configuration(postgresql.conf, pg_hba.conf, ...) à 2 endroits, comment savoir lesquels sont utilisés ? Et comment on dit à postgresql de pointer vers tel ou tel fichiers de conf (en fait, surtout le postgresql.conf, les autres je sais) ?

    - Ensuite je retrouve des executables en double :

    dans /usr/lib/postgresql/8.3/bin/ :
    -rwxr-xr-x 1 root root 231912 mar 14 20:03 pg_dump
    -rwxr-xr-x 1 root root 53192 mar 14 20:03 pg_dumpall
    -rwxr-xr-x 1 root root 93852 mar 14 20:03 pg_restore

    /usr/bin/
    -rwxr-xr-x 1 root root 4787 fév 6 2009 pg_dump
    -rwxr-xr-x 1 root root 4787 fév 6 2009 pg_dumpall
    -rwxr-xr-x 1 root root 4787 fév 6 2009 pg_restore
    Etant donné la taille homogène des fichiers dans usr/bin, est-ce qu'il s'agit d'une sorte de liens (mais pas de 'l' dans l'inode ??) ? Et sinon, lesquels sont utilisés ?


    En conclusion pour finir, j'aimerai :
    - supprimer le cluster dans var/lib
    - et positionner les bons fichiers de conf dans etc/postgresql/8.3
    Faire un peu de ménage quoi !

    Est-ce que vous pouvez m'aiguiller un peu ?

    Merci d'avance pour vos lumières !!

  2. #2
    Membre émérite
    Profil pro
    Inscrit en
    Octobre 2008
    Messages
    1 874
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Octobre 2008
    Messages : 1 874
    Points : 2 890
    Points
    2 890
    Par défaut
    Ensuite j'ai voulu créer un nouveau cluster via
    # initdb -D /serveur/data/pgsql/
    Tu as sûrement remarqué que initdb n'est pas dans le PATH par défaut, même pas celui de l'utilisateur postgres.
    C'est qu'avec le package debian, il ne faut pas utiliser initdb directement, mais pg_createcluster qui est dans /usr/bin. Il y a également pg_dropcluster, pg_ctlcluster etc...
    Ces commandes appellent en sous-main les vraies commandes comme initdb ou pg_ctl mais avec les paramètres et chemins conformes à l'environnement debian et au fait que les packages sont conçus pour gérer plusieurs clusters et plusieurs versions de PG simultanément.

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Mars 2009
    Messages
    33
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2009
    Messages : 33
    Points : 18
    Points
    18
    Par défaut
    Ok, ben merci beaucoup, ça répond parfaitement à mes questions.

    Du coup, pour chaque cluster il me créer des fichiers de config dans etc/postgresql/version/nom du cluster . Ok.

    C'est con quand on change de distrib linux, on n'est quand même pas tout à fait en territoire connu.

    Il me reste plus qu'à faire le ménage.

    merci encore.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. ça se passe comment l'organisation des fichiers source en java
    Par razily dans le forum Entrée/Sortie
    Réponses: 4
    Dernier message: 04/05/2009, 09h45
  2. Organisation des fichiers après génération
    Par mister3957 dans le forum Visual C++
    Réponses: 2
    Dernier message: 14/01/2009, 18h07
  3. [Smarty] Organisation des fichiers et inclusion
    Par Darkcristal dans le forum Bibliothèques et frameworks
    Réponses: 3
    Dernier message: 23/12/2008, 17h46
  4. [Système] Organisation des fichiers
    Par Prosis dans le forum Langage
    Réponses: 12
    Dernier message: 10/02/2008, 23h30
  5. Organisation des fichiers du programme
    Par greg13 dans le forum Linux
    Réponses: 2
    Dernier message: 16/03/2007, 15h25

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo