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 :
Jusque là ok.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/
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 :
D'où mes questions :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
- 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 :
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 ?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
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 !!
Partager