Comment faire? j'ai vu qu'il y avait pg_migrator mais je ne sais pas comment ça marche.
Comment faire? j'ai vu qu'il y avait pg_migrator mais je ne sais pas comment ça marche.
https://postgresql.developpez.com/do...tion/francais/
pg_dumpall peut suffire![]()
La théorie, c'est quand on sait tout mais que rien ne fonctionne.
La pratique, c'est quand tout fonctionne mais que personne ne sait pourquoi.
Ici, nous avons réuni théorie et pratique : Rien ne fonctionne ... et personne ne sait pourquoi !
Réplication de base avec Postgresql : http://scheu.developpez.com/tutoriel.../log-shipping/
Merci. ça peut m'aider, mais en fait mon problème c'est surtout que je veux utiliser Slony pour faire une synchro, mais quand je l'install il utilise pg_config qui renvoi que le bin dir est : BINDIR = /usr/lib/postgresql/8.3/bin
alors que en fait c'est 8.2 (il n 'y a meme pas de répertoire 8.3), donc je me suis dit que pour symplifier j'allais installer une autre version, mais l;e plus simple pour moi serait de changer le BINDIR.
Donc en fait ma question est plus simple, comment changer le BINDIR ?
Bonjour.
Pourrais-tu afficher la liste des fichiers présents dans ton /etc/slony? (ainsi que leur contenu; je pense que c'est là dedans que tu peux changer ta variable)
Bah justement slony j'ai pas encore pu l'installer à cause de ça, je l'ai juste décompressé, mais pour l'installer j'ai besoin du pg_config : http://www.slony.fr/documentation/installation.html
Dans mon fichier slony :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 /slony1-2.0.2# ls -l total 604 -rwxrwxrwx 1 noc noc 362 2009-07-06 11:37 aclocal.m4 drwxrwxrwx 2 noc noc 4096 2009-07-06 11:37 config -rwxrwxrwx 1 noc noc 2643 2009-07-06 11:37 config.h.in -rw-r--r-- 1 root root 41194 2009-07-07 10:45 config.log -rwxrwxrwx 1 noc noc 350871 2009-07-06 11:37 configure -rwxrwxrwx 1 noc noc 7109 2009-07-06 11:37 configure.ac -rwxrwxrwx 1 noc noc 1099 2009-07-06 11:37 COPYRIGHT drwxrwxrwx 8 noc noc 4096 2009-07-06 11:37 doc -rwxrwxrwx 1 noc noc 2305 2009-07-06 11:37 GNUmakefile.in -rwxrwxrwx 1 noc noc 79612 2009-07-06 11:37 HISTORY-1.1 -rwxrwxrwx 1 noc noc 5160 2009-07-06 11:37 INSTALL -rwxrwxrwx 1 noc noc 735 2009-07-06 11:37 Makefile -rwxrwxrwx 1 noc noc 2518 2009-07-06 11:37 Makefile.global.in drwxrwxrwx 2 noc noc 4096 2009-07-06 11:37 makefiles -rwxrwxrwx 1 noc noc 1913 2009-07-06 11:37 README -rwxrwxrwx 1 noc noc 2486 2009-07-06 11:37 README.Unicode drwxrwxrwx 2 noc noc 4096 2009-07-06 11:37 redhat -rwxrwxrwx 1 noc noc 3281 2009-07-06 11:37 RELEASE -rwxrwxrwx 1 noc noc 8629 2009-07-06 11:37 RELEASE-2.0 -rwxrwxrwx 1 noc noc 11356 2009-07-06 11:37 SAMPLE drwxrwxrwx 2 noc noc 4096 2009-07-06 11:37 share -rwxrwxrwx 1 noc noc 7775 2009-07-06 11:37 slony1.spec.in drwxrwxrwx 11 noc noc 4096 2009-07-06 11:37 src drwxrwxrwx 2 noc noc 4096 2009-07-06 11:37 suse drwxrwxrwx 19 noc noc 4096 2009-07-06 11:37 tests -rwxrwxrwx 1 noc noc 3944 2009-07-06 11:37 TODO drwxrwxrwx 5 noc noc 4096 2009-07-06 11:37 tools -rwxrwxrwx 1 noc noc 3061 2009-07-06 11:37 UPGRADING
et quand je lance le ./configure il y a une erreur car il cherche dans postgresql 8.3 alors que c'est dans le 8.2 :
pourtant après meme si je fais un ./configure --with-pgklibdir=/usr/lib/postgresql/8.2/lib/plpgsql.so (le fichier est bien présent), il me répond :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 pg_config says pg_bindir is /usr/lib/postgresql/8.3/bin/ pg_config says pg_libdir is /usr/lib/ pg_config says pg_includedir is /usr/include/postgresql/ pg_config says pg_pkglibdir is /usr/lib/postgresql/8.3/lib/ pg_config says pg_includeserverdir is /usr/include/postgresql/8.3/server/ checking for correct version of PostgreSQL... 8.3 8.3 Error 1 pg_config says pg_sharedir is /usr/share/postgresql/8.3/ configure: error: /usr/lib/postgresql/8.3/lib//plpgsql.so|sl|dll is not found in the pkglibdir.
configure: error: /usr/lib/postgresql/8.3/lib//plpgsql.so|sl|dll is not found in the pkglibdir.
Please specify the pkglibdir with --with-pgpkglibdir=<dir>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 checking postgres.h usability... yes checking postgres.h presence... yes checking for postgres.h... yes checking for utils/typcache.h... no checking for plpgsql.so... no
pg_config trouve le bindir est prenant son propre chemin et en enlevant son nom à la fin…
voir le code source :
http://doxygen.postgresql.org/pg__config_8c-source.html
son propre chemin est découvert via la fonction find_my_exec()
http://doxygen.postgresql.org/port_8...3c016743026386
et cette fonction résoud les liens symboliques…
si cette fonction renvoit effectivement un chemin qui n'existe pas, vous avez d'autres soucis plus importants à résoudre sur cette machine… !
(et pour répondre à la question : non on ne peut pas changer BINDIR par une variable quelconque : BINDIR est le dossier dans lequel se trouve l'exécutable invoqué… déplacez pg_config et BINDIR suivera…)
Partager