Vous n'êtes pas identifié(e).
- Contributions : Récentes | Sans réponse
#1 Re : Général » Arrêt du log » 09/03/2011 10:16:39
A ma connaissance, vi fait un fopen du fichier.... donc il devrait avoir de la peine à ne pas garder le même no d'inode... à l'execption notable de la "save as..." (w nonFichier!)
Je serai attentif si le problème se reproduit...
m.s.
#2 Re : Général » Arrêt du log » 08/03/2011 16:56:04
Edité avec vi,
Supprimé n-10 lignes
Sauvé avec :x
... et je confirme, ça ne me l'a jamais fait... mais sur le coup, en l'intervalle de 2 semaines, j'ai ma base de prod et ma base de staging qui ont fait la même chose.
#3 Re : Général » Arrêt du log » 08/03/2011 14:55:29
Je n'ai pas supprimé le fichier.
Je l'ai juste purgé.
Le no d'inode n'a pas été modifié.
La journalisation ne reprend pourtant pas.
Le redémarrage a bien évidemment résolu le problème, mais j'aurai souhaité connaître la cause du problème...
m.s.
#4 Re : Général » Arrêt du log » 08/03/2011 09:19:59
Ah oui, désolé, l'empressement...
PG v. 8.3 sur Aix.
#log_destination = 'stderr'
#logging_collector = off
log_truncate_on_rotation = off
Ceci étant dit, ils ont toujours été dans cet état.
#5 Re : Général » Copier le data de postgres sous nas windows » 07/03/2011 16:43:40
Oui, tu peux le faire sans autre comme indiqué. Les droits devraient suivre, hormis si tu as un utilisateur local.
Dans ce cas, fais une install via un utilisateur de domaine dans une nouvelle base est passe via le export/import.
#6 Général » Arrêt du log » 07/03/2011 15:49:24
- fadace
- Réponses : 8
Bonjour,
Sur la plupart de mes instances Postgresql, j'ai une activité normale, mais depuis près d'un mois, plus aucune trace dans le journal... et d'habitude, couplé à une réplication, c'est assez verbeux.
Je ne trouve pas, dans le fichier de conf, s'il est possible de configurer une taille maximale, un journal tournant ou quelque chose du style, mais j'ai sans doute dû passer à côté...
Le volume n'est pas plein...
Une idée ?
D'avance merci
Fabien
#7 Re : Réplication » Connexion remote ou connexion locale avec comportement différent » 15/10/2010 09:26:16
Si je me connecte en local, je spécifie quand même un port, et je traverse la couche TCP/IP... donc pourquoi cela marche-t-il en "local" (avec de guillemets puisqu'au travers de la couche TCP) ?
#8 Réplication » Connexion remote ou connexion locale avec comportement différent » 14/10/2010 10:04:11
- fadace
- Réponses : 3
Bonjour,
Sur le même host, DBA1 j'ai 3 bases primaires : P1, S1 et I1
Sur un second host DBA2, j'ai 3 bases en standby : P2, S2 et I2
Jusque là, tout va bien.
Lorsque j'essaie de me connecter à l'une des baes P2 ou S2, j'obtiens le message correct:
[postgres@dba2] > psql -h dba2 -p 58432
psql: FATAL: the database system is starting up
Ce qui me convient.
La base I2 est, par contre, problématique...
Si je tente de m'y connecter localement, pas de soucis:
[postgres@dba2] > psql -p 57432
psql: FATAL: the database system is starting up
Par contre, si je tente de m'y connecter à distance (ou en spécifiant le host), j'ai une toute autre erreur
[postgres@dba2] > psql -h dba2 -p 57432
psql: could not connect to server: A remote host refused an attempted connect operation.
Is the server running on host "gmapdba02" and accepting
TCP/IP connections on port 57432?
Mon fichier ph_hba.conf me semble pourtant correct...
Qu'en pensez-vous ?
#9 Re : Réplication » WSB WAL bidirectionnelle et journaux » 10/05/2010 10:32:32
Me voila rassuré
Merci
Fadace
#10 Re : Réplication » Log shipping et WAL/Standby » 10/05/2010 10:31:27
Ok. ça semble marcher maintenant.
J'ai par contre un cas étrange sur mon environnement de staging.
Si je contrôle la base Cible, et son journal d'alerte, j'ai un récurrent
2010-05-10 10:30:05 DFTLOG: starting archive recovery
2010-05-10 10:30:05 DFTLOG: restore_command = '/opt/postgres84/bin/pg_standby -d -t /data/WAL/DB1S/stopstandby /data/WAL/DB1S %f %p %r >> /home/postgres/scripts/LOG/WSB_DB1S.log 2>&1'
2010-05-10 10:30:08 DFTFATAL: the database system is starting up
2010-05-10 10:30:08 DFTFATAL: the database system is starting up
2010-05-10 10:30:08 DFTFATAL: the database system is starting up
...
plutôt que l'attendu
2010-05-10 10:23:18 DFTLOG: restored log file "000000010000003800000044" from archive
jusqu'au consistant state
Fadace
#11 Re : Publications » Comparaison PostgreSQL - SQL server » 09/05/2010 16:18:58
Difficile de considérer une étude de RH comparant une DB phare sur Linux à LA db monolithique sous Windows comme absolument impartiale.
Les détails de la configuration Postgresql sont bien renseignés... pas ceux sur MS-SQL...
ceci étant dit, ça fait plaisir à voir et casse quelques idées reçues...
fadace
#12 Réplication » WSB WAL bidirectionnelle et journaux » 07/05/2010 14:18:08
- fadace
- Réponses : 2
Hello,
Je souhaite avec une réplication WSB aller-retour (bien entendu, pas en même temps)
Cas normal : A (actif) -> B (WSB)
Cas dégradé : A (coupé) -> B (actif)
Pour le retour à la normal, je souhaiterai avoir
B (actif) -> A (WSB)
De manière à pouvoir bascule avec le moins de downtime possible.
Pour ce faire, il faut que j'active mon mode archive des 2 côtés... Cela ne risque-t-il pas de causer des problèmes (incapacité pour Postgres de faire le distinguo entre les archives venant d'une ou de l'autre base) ?
m.s.
Fadace
#13 Re : Réplication » Log shipping et WAL/Standby » 05/05/2010 16:32:22
Encore un détail : lorsque j'exécute un touch stopstandby, ma base finit bien par s'ouvrr, et cela marche, par contre, ces messages vous dises-ils qqch ? Dois-je m'en alarmer ?
Au niveau du log ph_standby
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
trigger file found: smart failover
Trigger file : /data/WAL/1P/stopstandby
Waiting for WAL file : 0000000100000001000000D7
WAL file path : /data/WAL/1P/0000000100000001000000D7
Restoring to : pg_xlog/RECOVERYXLOG
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : /usr/bin/cp "/data/WAL/1P/0000000100000001000000D7" "pg_xlog/RECOVERYXLOG"
Keep archive history : 000000000000000000000000 and later
trigger file found: smart failover
running restore : OK
Trigger file : /data/WAL/1P/stopstandby
Waiting for WAL file : 00000002.history
WAL file path : /data/WAL/1P/00000002.history
Restoring to : pg_xlog/RECOVERYHISTORY
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : /usr/bin/cp "/data/WAL/1P/00000002.history" "pg_xlog/RECOVERYHISTORY"
Keep archive history : 000000000000000000000000 and later
running restore :cp: /data/WAL/1P/00000002.history: A file or directory in the path name does no
t exist.
cp: /data/WAL/1P/00000002.history: A file or directory in the path name does not exist.
cp: /data/WAL/1P/00000002.history: A file or directory in the path name does not exist.
cp: /data/WAL/1P/00000002.history: A file or directory in the path name does not exist.
not restored
history file not found
Trigger file : /data/WAL/1P/stopstandby
Waiting for WAL file : 00000001.history
WAL file path : /data/WAL/1P/00000001.history
Restoring to : pg_xlog/RECOVERYHISTORY
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : /usr/bin/cp "/data/WAL/1P/00000001.history" "pg_xlog/RECOVERYHISTORY"
Keep archive history : 000000000000000000000000 and later
running restore :cp: /data/WAL/1P/00000001.history: A file or directory in the path name does no
t exist.
cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
not restored
history file not found
Au niveau de la base
2010-05-05 16:18:54 DFTLOG: restored log file "0000000100000001000000D6" from archive
2010-05-05 16:23:55 DFTLOG: restored log file "0000000100000001000000D7" from archive
2010-05-05 16:25:40 DFTLOG: could not open file "pg_xlog/0000000100000001000000D8" (log file 1, segment 216): A file or directory in the path name does not exist.
2010-05-05 16:25:40 DFTLOG: redo done at 1/D7000068
2010-05-05 16:25:40 DFTLOG: last completed transaction was at log time 2010-05-05 14:37:59.802477+02
2010-05-05 16:25:40 DFTLOG: restored log file "0000000100000001000000D7" from archive
2010-05-05 16:26:10 DFTLOG: selected new timeline ID: 2
2010-05-05 16:26:40 DFTLOG: archive recovery complete
2010-05-05 16:26:40 DFTLOG: database system is ready to accept connections
2010-05-05 16:26:40 DFTLOG: autovacuum launcher started
#14 Re : Réplication » Log shipping et WAL/Standby » 05/05/2010 14:27:21
Merci de votre aide
#15 Re : Réplication » Log shipping et WAL/Standby » 05/05/2010 14:06:21
J'utilise pourtant moi aussi l'utilisateur postgres
La question a se poser est peut-être dans le shell qu'il utilise.
Je suis perso le Korn shell , et c'est celui qui et utilisé par défaut pour le login postgres.
Un which cp retourne la bonne commande.
J'ai essayé en mode "bourrin" : j'ai recompilé le pg_standby en hard-codant le chemin pour la commande cp
SET_RESTORE_COMMAND("/usr/bin/cp", WALFilePath, xlogFilePath);
et là, ça semble marcher... mais c'est de loin pas très élégant...
D'autres soucis semble persister
Trigger file : /data/WAL/1P/stopstandby
Waiting for WAL file : 00000001.history
WAL file path : /data/WAL/1P/00000001.history
Restoring to : pg_xlog/RECOVERYHISTORY
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : /usr/bin/cp "/data/WAL/1P/00000001.history" "pg_xlog/RECOVERYHISTORY"
Keep archive history : 000000000000000000000000 and later
running restore :cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
not restored
history file not found
Trigger file : /data/WAL/1P/stopstandby
Waiting for WAL file : 0000000100000001000000B5.00000020.backup
WAL file path : /data/WAL/1P/0000000100000001000000B5.00000020.backup
Restoring to : pg_xlog/RECOVERYHISTORY
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : /usr/bin/cp "/data/WAL/1P/0000000100000001000000B5.00000020.backup" "pg_xlog/RECOVERYHISTORY"
Keep archive history : 000000000000000000000000 and later
running restore : OK
Trigger file : /data/WAL/1P/stopstandby
Waiting for WAL file : 0000000100000001000000B5
WAL file path : /data/WAL/1P/0000000100000001000000B5
Restoring to : pg_xlog/RECOVERYXLOG
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : /usr/bin/cp "/data/WAL/1P/0000000100000001000000B5" "pg_xlog/RECOVERYXLOG"
Keep archive history : 000000000000000000000000 and later
running restore : OK
Trigger file : /data/WAL/1P/stopstandby
Waiting for WAL file : 0000000100000001000000B6
WAL file path : /data/WAL/1P/0000000100000001000000B6
Restoring to : pg_xlog/RECOVERYXLOG
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : /usr/bin/cp "/data/WAL/1P/0000000100000001000000B6" "pg_xlog/RECOVERYXLOG"
Keep archive history : 0000000100000001000000B5 and later
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
WAL file not present yet. Checking for trigger file...
ou est-ce un message normal qui spécifie qu'il est en attente de futurs fichiers ?
Dans le log de la base, cela semble aller au mieux :
2010-05-05 14:11:06 DFTLOG: database system was interrupted while in recovery at log time 2010-05-05 14:05:19 DFT
2010-05-05 14:11:06 DFTHINT: If this has occurred more than once some data might be corrupted and you might need to choose
an earlier recovery target.
2010-05-05 14:11:06 DFTLOG: starting archive recovery
2010-05-05 14:11:06 DFTLOG: restore_command = '/opt/postgres84/bin/pg_standby -d -t /data/WAL/1P/stopstandby /data/WAL/1P %
f %p %r >> /home/postgres/scripts/LOG/WSB_POEL1P.log 2>&1'
2010-05-05 14:11:36 DFTLOG: restored log file "0000000100000001000000B6" from archive
2010-05-05 14:11:36 DFTLOG: automatic recovery in progress
2010-05-05 14:11:36 DFTLOG: redo starts at 1/B6000068, consistency will be reached at 1/B7000000
2010-05-05 14:11:36 DFTLOG: restored log file "0000000100000001000000B7" from archive
2010-05-05 14:11:36 DFTLOG: consistent recovery state reached
#16 Re : Réplication » Log shipping et WAL/Standby » 05/05/2010 10:39:26
Ok. J'ai compilé et configuré le pg_standby
restore_command = '/opt/postgresql84/bin/pg_standby -d -t /data/WAL/1P/stopstandby /data/WAL/1P %f %p %r >> /home/postgres/scripts/LOG/WSB.log 2>&1'
Au démarrage, j'ai maintenant
2010-05-05 09:52:52 DFTLOG: database system was interrupted; last known up at 2010-05-05 09:32:38 DFT
2010-05-05 09:52:52 DFTLOG: starting archive recovery
2010-05-05 09:52:52 DFTLOG: restore_command = '/opt/postgresql84/bin/pg_standby -d -t /data/WAL/1P/stopstandby /data/WAL/1P
%f %p %r >> /home/postgres/scripts/LOG/WSB.log 2>&1'
... et cela reste là, ce qui semble de bon augure
Concernant le log, j'ai
Trigger file : /data/WAL/1P/stopstandby
Waiting for WAL file : 00000001.history
WAL file path : /data/WAL/1P/00000001.history
Restoring to : pg_xlog/RECOVERYHISTORY
Sleep interval : 5 seconds
Max wait interval : 0 forever
Command for restore : cp "/data/WAL/1P/00000001.history" "pg_xlog/RECOVERYHISTORY"
Keep archive history : 000000000000000000000000 and later
running restore :sh: cp: not found.
sh: cp: not found.
sh: cp: not found.
sh et cp sont dans mon PATH (/usr/bin) mais cela semble indisposer le pg_standby. d'où tire-t-il sa commande sous "Command for restore" ?
D'autre part, je ne trouve effectivement pas de ficher /data/WAL/1P/00000001.history. D'où le tire-t-il ?
Sous pg_xlog, j'ai
drwx------ 3 postgres postgres 4096 May 05 10:33 .
drwx------ 11 postgres postgres 4096 May 05 10:36 ..
-rw------- 1 postgres postgres 252 May 05 09:50 00000001000000010000007C.00000020.backup
-rw------- 1 postgres postgres 16777216 May 05 10:32 000000010000000100000088
-rw------- 1 postgres postgres 16777216 May 05 10:33 000000010000000100000089
-rw------- 1 postgres postgres 16777216 May 05 10:02 00000001000000010000008A
-rw------- 1 postgres postgres 16777216 May 05 10:07 00000001000000010000008B
-rw------- 1 postgres postgres 16777216 May 05 10:12 00000001000000010000008C
-rw------- 1 postgres postgres 16777216 May 05 10:17 00000001000000010000008D
-rw------- 1 postgres postgres 16777216 May 05 10:22 00000001000000010000008E
-rw------- 1 postgres postgres 16777216 May 05 10:27 00000001000000010000008F
drwx------ 2 postgres postgres 256 May 05 10:33 archive_status
Sous /data/WAL/1P/, j'ai
[postgres@gmapdba02] > ll
total 7012448
drwxr-xr-x 2 postgres postgres 16384 May 05 10:35 .
drwxr-xr-x 4 postgres postgres 256 May 05 10:33 ..
-rw------- 1 postgres postgres 16777216 May 04 17:05 0000000100000000000000B3
-rw------- 1 postgres postgres 16777216 May 04 17:07 0000000100000000000000B4
-rw------- 1 postgres postgres 252 May 04 17:08 0000000100000000000000B4.00000020.backup
-rw------- 1 postgres postgres 16777216 May 04 17:12 0000000100000000000000B5
-rw------- 1 postgres postgres 16777216 May 04 17:17 0000000100000000000000B6
-rw------- 1 postgres postgres 16777216 May 04 17:18 0000000100000000000000B7
-rw------- 1 postgres postgres 252 May 04 17:19 0000000100000000000000B7.00000020.backup
-rw------- 1 postgres postgres 16777216 May 04 17:20 0000000100000000000000B8
-rw------- 1 postgres postgres 252 May 04 17:21 0000000100000000000000B8.00000020.backup
-rw------- 1 postgres postgres 16777216 May 04 17:25 0000000100000000000000B9
-rw------- 1 postgres postgres 16777216 May 04 17:30 0000000100000000000000BA
-rw------- 1 postgres postgres 16777216 May 04 17:35 0000000100000000000000BB
-rw------- 1 postgres postgres 16777216 May 04 17:40 0000000100000000000000BC
-rw------- 1 postgres postgres 16777216 May 04 17:45 0000000100000000000000BD
-rw------- 1 postgres postgres 16777216 May 04 17:50 0000000100000000000000BE
-rw------- 1 postgres postgres 16777216 May 04 17:55 0000000100000000000000BF
-rw------- 1 postgres postgres 16777216 May 04 18:00 0000000100000000000000C0
-rw------- 1 postgres postgres 16777216 May 04 18:05 0000000100000000000000C1
-rw------- 1 postgres postgres 16777216 May 04 18:10 0000000100000000000000C2
-rw------- 1 postgres postgres 16777216 May 04 18:15 0000000100000000000000C3
-rw------- 1 postgres postgres 16777216 May 04 18:20 0000000100000000000000C4
-rw------- 1 postgres postgres 16777216 May 04 18:25 0000000100000000000000C5
-rw------- 1 postgres postgres 16777216 May 04 18:30 0000000100000000000000C6
-rw------- 1 postgres postgres 16777216 May 04 18:35 0000000100000000000000C7
-rw------- 1 postgres postgres 16777216 May 04 18:40 0000000100000000000000C8
-rw------- 1 postgres postgres 16777216 May 04 18:45 0000000100000000000000C9
-rw------- 1 postgres postgres 16777216 May 04 18:50 0000000100000000000000CA
-rw------- 1 postgres postgres 16777216 May 04 18:55 0000000100000000000000CB
-rw------- 1 postgres postgres 16777216 May 04 19:00 0000000100000000000000CC
-rw------- 1 postgres postgres 16777216 May 04 19:05 0000000100000000000000CD
-rw------- 1 postgres postgres 16777216 May 04 19:10 0000000100000000000000CE
-rw------- 1 postgres postgres 16777216 May 04 19:15 0000000100000000000000CF
-rw------- 1 postgres postgres 16777216 May 04 19:20 0000000100000000000000D0
-rw------- 1 postgres postgres 16777216 May 04 19:25 0000000100000000000000D1
-rw------- 1 postgres postgres 16777216 May 04 19:30 0000000100000000000000D2
-rw------- 1 postgres postgres 16777216 May 04 19:35 0000000100000000000000D3
-rw------- 1 postgres postgres 16777216 May 04 19:40 0000000100000000000000D4
-rw------- 1 postgres postgres 16777216 May 04 19:45 0000000100000000000000D5
-rw------- 1 postgres postgres 16777216 May 04 19:50 0000000100000000000000D6
-rw------- 1 postgres postgres 16777216 May 04 19:55 0000000100000000000000D7
-rw------- 1 postgres postgres 16777216 May 04 20:00 0000000100000000000000D8
-rw------- 1 postgres postgres 16777216 May 04 20:05 0000000100000000000000D9
-rw------- 1 postgres postgres 16777216 May 04 20:10 0000000100000000000000DA
-rw------- 1 postgres postgres 16777216 May 04 20:15 0000000100000000000000DB
-rw------- 1 postgres postgres 16777216 May 04 20:20 0000000100000000000000DC
-rw------- 1 postgres postgres 16777216 May 04 20:25 0000000100000000000000DD
-rw------- 1 postgres postgres 16777216 May 04 20:30 0000000100000000000000DE
-rw------- 1 postgres postgres 16777216 May 04 20:35 0000000100000000000000DF
-rw------- 1 postgres postgres 16777216 May 04 20:40 0000000100000000000000E0
-rw------- 1 postgres postgres 16777216 May 04 20:45 0000000100000000000000E1
-rw------- 1 postgres postgres 16777216 May 04 20:50 0000000100000000000000E2
-rw------- 1 postgres postgres 16777216 May 04 20:55 0000000100000000000000E3
-rw------- 1 postgres postgres 16777216 May 04 21:00 0000000100000000000000E4
-rw------- 1 postgres postgres 16777216 May 04 21:05 0000000100000000000000E5
-rw------- 1 postgres postgres 16777216 May 04 21:10 0000000100000000000000E6
-rw------- 1 postgres postgres 16777216 May 04 21:15 0000000100000000000000E7
-rw------- 1 postgres postgres 16777216 May 04 21:20 0000000100000000000000E8
-rw------- 1 postgres postgres 16777216 May 04 21:25 0000000100000000000000E9
-rw------- 1 postgres postgres 16777216 May 04 21:30 0000000100000000000000EA
-rw------- 1 postgres postgres 16777216 May 04 21:35 0000000100000000000000EB
-rw------- 1 postgres postgres 16777216 May 04 21:40 0000000100000000000000EC
-rw------- 1 postgres postgres 16777216 May 04 21:45 0000000100000000000000ED
-rw------- 1 postgres postgres 16777216 May 04 21:50 0000000100000000000000EE
-rw------- 1 postgres postgres 16777216 May 04 21:55 0000000100000000000000EF
-rw------- 1 postgres postgres 16777216 May 04 22:00 0000000100000000000000F0
-rw------- 1 postgres postgres 16777216 May 04 22:05 0000000100000000000000F1
-rw------- 1 postgres postgres 16777216 May 04 22:10 0000000100000000000000F2
-rw------- 1 postgres postgres 16777216 May 04 22:15 0000000100000000000000F3
-rw------- 1 postgres postgres 16777216 May 04 22:20 0000000100000000000000F4
-rw------- 1 postgres postgres 16777216 May 04 22:25 0000000100000000000000F5
-rw------- 1 postgres postgres 16777216 May 04 22:30 0000000100000000000000F6
-rw------- 1 postgres postgres 16777216 May 04 22:35 0000000100000000000000F7
-rw------- 1 postgres postgres 16777216 May 04 22:40 0000000100000000000000F8
-rw------- 1 postgres postgres 16777216 May 04 22:45 0000000100000000000000F9
-rw------- 1 postgres postgres 16777216 May 04 22:50 0000000100000000000000FA
-rw------- 1 postgres postgres 16777216 May 04 22:55 0000000100000000000000FB
-rw------- 1 postgres postgres 16777216 May 04 23:00 0000000100000000000000FC
-rw------- 1 postgres postgres 16777216 May 04 23:05 0000000100000000000000FD
-rw------- 1 postgres postgres 16777216 May 04 23:10 0000000100000000000000FE
-rw------- 1 postgres postgres 16777216 May 04 23:15 000000010000000100000000
-rw------- 1 postgres postgres 16777216 May 04 23:20 000000010000000100000001
-rw------- 1 postgres postgres 16777216 May 04 23:25 000000010000000100000002
-rw------- 1 postgres postgres 16777216 May 04 23:30 000000010000000100000003
-rw------- 1 postgres postgres 16777216 May 04 23:35 000000010000000100000004
-rw------- 1 postgres postgres 16777216 May 04 23:40 000000010000000100000005
-rw------- 1 postgres postgres 16777216 May 04 23:45 000000010000000100000006
-rw------- 1 postgres postgres 16777216 May 04 23:50 000000010000000100000007
-rw------- 1 postgres postgres 16777216 May 04 23:55 000000010000000100000008
-rw------- 1 postgres postgres 16777216 May 05 00:00 000000010000000100000009
-rw------- 1 postgres postgres 16777216 May 05 00:05 00000001000000010000000A
-rw------- 1 postgres postgres 16777216 May 05 00:10 00000001000000010000000B
-rw------- 1 postgres postgres 16777216 May 05 00:15 00000001000000010000000C
-rw------- 1 postgres postgres 16777216 May 05 00:20 00000001000000010000000D
-rw------- 1 postgres postgres 16777216 May 05 00:25 00000001000000010000000E
-rw------- 1 postgres postgres 16777216 May 05 00:30 00000001000000010000000F
-rw------- 1 postgres postgres 16777216 May 05 00:35 000000010000000100000010
-rw------- 1 postgres postgres 16777216 May 05 00:40 000000010000000100000011
-rw------- 1 postgres postgres 16777216 May 05 00:45 000000010000000100000012
-rw------- 1 postgres postgres 16777216 May 05 00:50 000000010000000100000013
-rw------- 1 postgres postgres 16777216 May 05 00:55 000000010000000100000014
-rw------- 1 postgres postgres 16777216 May 05 01:00 000000010000000100000015
-rw------- 1 postgres postgres 16777216 May 05 01:05 000000010000000100000016
-rw------- 1 postgres postgres 16777216 May 05 01:10 000000010000000100000017
-rw------- 1 postgres postgres 16777216 May 05 01:15 000000010000000100000018
-rw------- 1 postgres postgres 16777216 May 05 01:20 000000010000000100000019
-rw------- 1 postgres postgres 16777216 May 05 01:25 00000001000000010000001A
-rw------- 1 postgres postgres 16777216 May 05 01:30 00000001000000010000001B
-rw------- 1 postgres postgres 16777216 May 05 01:35 00000001000000010000001C
-rw------- 1 postgres postgres 16777216 May 05 01:40 00000001000000010000001D
-rw------- 1 postgres postgres 16777216 May 05 01:45 00000001000000010000001E
-rw------- 1 postgres postgres 16777216 May 05 01:50 00000001000000010000001F
-rw------- 1 postgres postgres 16777216 May 05 01:55 000000010000000100000020
-rw------- 1 postgres postgres 16777216 May 05 02:00 000000010000000100000021
-rw------- 1 postgres postgres 16777216 May 05 02:05 000000010000000100000022
-rw------- 1 postgres postgres 16777216 May 05 02:10 000000010000000100000023
-rw------- 1 postgres postgres 16777216 May 05 02:15 000000010000000100000024
-rw------- 1 postgres postgres 16777216 May 05 02:20 000000010000000100000025
-rw------- 1 postgres postgres 16777216 May 05 02:25 000000010000000100000026
-rw------- 1 postgres postgres 16777216 May 05 02:30 000000010000000100000027
-rw------- 1 postgres postgres 16777216 May 05 02:35 000000010000000100000028
-rw------- 1 postgres postgres 16777216 May 05 02:40 000000010000000100000029
-rw------- 1 postgres postgres 16777216 May 05 02:45 00000001000000010000002A
-rw------- 1 postgres postgres 16777216 May 05 02:50 00000001000000010000002B
-rw------- 1 postgres postgres 16777216 May 05 02:55 00000001000000010000002C
-rw------- 1 postgres postgres 16777216 May 05 03:00 00000001000000010000002D
-rw------- 1 postgres postgres 16777216 May 05 03:05 00000001000000010000002E
-rw------- 1 postgres postgres 16777216 May 05 03:10 00000001000000010000002F
-rw------- 1 postgres postgres 16777216 May 05 03:15 000000010000000100000030
-rw------- 1 postgres postgres 16777216 May 05 03:20 000000010000000100000031
-rw------- 1 postgres postgres 16777216 May 05 03:25 000000010000000100000032
-rw------- 1 postgres postgres 16777216 May 05 03:30 000000010000000100000033
-rw------- 1 postgres postgres 16777216 May 05 03:35 000000010000000100000034
-rw------- 1 postgres postgres 16777216 May 05 03:40 000000010000000100000035
-rw------- 1 postgres postgres 16777216 May 05 03:45 000000010000000100000036
-rw------- 1 postgres postgres 16777216 May 05 03:50 000000010000000100000037
-rw------- 1 postgres postgres 16777216 May 05 03:55 000000010000000100000038
-rw------- 1 postgres postgres 16777216 May 05 04:00 000000010000000100000039
-rw------- 1 postgres postgres 16777216 May 05 04:05 00000001000000010000003A
-rw------- 1 postgres postgres 16777216 May 05 04:10 00000001000000010000003B
-rw------- 1 postgres postgres 16777216 May 05 04:15 00000001000000010000003C
-rw------- 1 postgres postgres 16777216 May 05 04:20 00000001000000010000003D
-rw------- 1 postgres postgres 16777216 May 05 04:25 00000001000000010000003E
-rw------- 1 postgres postgres 16777216 May 05 04:30 00000001000000010000003F
-rw------- 1 postgres postgres 16777216 May 05 04:35 000000010000000100000040
-rw------- 1 postgres postgres 16777216 May 05 04:40 000000010000000100000041
-rw------- 1 postgres postgres 16777216 May 05 04:45 000000010000000100000042
-rw------- 1 postgres postgres 16777216 May 05 04:50 000000010000000100000043
-rw------- 1 postgres postgres 16777216 May 05 04:55 000000010000000100000044
-rw------- 1 postgres postgres 16777216 May 05 05:00 000000010000000100000045
-rw------- 1 postgres postgres 16777216 May 05 05:05 000000010000000100000046
-rw------- 1 postgres postgres 16777216 May 05 05:10 000000010000000100000047
-rw------- 1 postgres postgres 16777216 May 05 05:15 000000010000000100000048
-rw------- 1 postgres postgres 16777216 May 05 05:20 000000010000000100000049
-rw------- 1 postgres postgres 16777216 May 05 05:25 00000001000000010000004A
-rw------- 1 postgres postgres 16777216 May 05 05:30 00000001000000010000004B
-rw------- 1 postgres postgres 16777216 May 05 05:35 00000001000000010000004C
-rw------- 1 postgres postgres 16777216 May 05 05:40 00000001000000010000004D
-rw------- 1 postgres postgres 16777216 May 05 05:45 00000001000000010000004E
-rw------- 1 postgres postgres 16777216 May 05 05:50 00000001000000010000004F
-rw------- 1 postgres postgres 16777216 May 05 05:55 000000010000000100000050
-rw------- 1 postgres postgres 16777216 May 05 06:00 000000010000000100000051
-rw------- 1 postgres postgres 16777216 May 05 06:05 000000010000000100000052
-rw------- 1 postgres postgres 16777216 May 05 06:10 000000010000000100000053
-rw------- 1 postgres postgres 16777216 May 05 06:15 000000010000000100000054
-rw------- 1 postgres postgres 16777216 May 05 06:20 000000010000000100000055
-rw------- 1 postgres postgres 16777216 May 05 06:25 000000010000000100000056
-rw------- 1 postgres postgres 16777216 May 05 06:30 000000010000000100000057
-rw------- 1 postgres postgres 16777216 May 05 06:35 000000010000000100000058
-rw------- 1 postgres postgres 16777216 May 05 06:40 000000010000000100000059
-rw------- 1 postgres postgres 16777216 May 05 06:45 00000001000000010000005A
-rw------- 1 postgres postgres 16777216 May 05 06:50 00000001000000010000005B
-rw------- 1 postgres postgres 16777216 May 05 06:55 00000001000000010000005C
-rw------- 1 postgres postgres 16777216 May 05 07:00 00000001000000010000005D
-rw------- 1 postgres postgres 16777216 May 05 07:05 00000001000000010000005E
-rw------- 1 postgres postgres 16777216 May 05 07:10 00000001000000010000005F
-rw------- 1 postgres postgres 16777216 May 05 07:15 000000010000000100000060
-rw------- 1 postgres postgres 16777216 May 05 07:20 000000010000000100000061
-rw------- 1 postgres postgres 16777216 May 05 07:25 000000010000000100000062
-rw------- 1 postgres postgres 16777216 May 05 07:30 000000010000000100000063
-rw------- 1 postgres postgres 16777216 May 05 07:35 000000010000000100000064
-rw------- 1 postgres postgres 16777216 May 05 07:40 000000010000000100000065
-rw------- 1 postgres postgres 16777216 May 05 07:45 000000010000000100000066
-rw------- 1 postgres postgres 16777216 May 05 07:50 000000010000000100000067
-rw------- 1 postgres postgres 16777216 May 05 07:55 000000010000000100000068
-rw------- 1 postgres postgres 16777216 May 05 08:00 000000010000000100000069
-rw------- 1 postgres postgres 16777216 May 05 08:05 00000001000000010000006A
-rw------- 1 postgres postgres 16777216 May 05 08:10 00000001000000010000006B
-rw------- 1 postgres postgres 16777216 May 05 08:15 00000001000000010000006C
-rw------- 1 postgres postgres 16777216 May 05 08:20 00000001000000010000006D
-rw------- 1 postgres postgres 16777216 May 05 08:25 00000001000000010000006E
-rw------- 1 postgres postgres 16777216 May 05 08:30 00000001000000010000006F
-rw------- 1 postgres postgres 16777216 May 05 08:35 000000010000000100000070
-rw------- 1 postgres postgres 16777216 May 05 08:40 000000010000000100000071
-rw------- 1 postgres postgres 16777216 May 05 08:45 000000010000000100000072
-rw------- 1 postgres postgres 16777216 May 05 08:50 000000010000000100000073
-rw------- 1 postgres postgres 16777216 May 05 08:55 000000010000000100000074
-rw------- 1 postgres postgres 16777216 May 05 09:00 000000010000000100000075
-rw------- 1 postgres postgres 16777216 May 05 09:05 000000010000000100000076
-rw------- 1 postgres postgres 16777216 May 05 09:10 000000010000000100000077
-rw------- 1 postgres postgres 16777216 May 05 09:15 000000010000000100000078
-rw------- 1 postgres postgres 16777216 May 05 09:20 000000010000000100000079
-rw------- 1 postgres postgres 16777216 May 05 09:25 00000001000000010000007A
-rw------- 1 postgres postgres 16777216 May 05 09:30 00000001000000010000007B
-rw------- 1 postgres postgres 16777216 May 05 09:33 00000001000000010000007C
-rw------- 1 postgres postgres 252 May 05 09:50 00000001000000010000007C.00000020.backup
-rw------- 1 postgres postgres 16777216 May 05 09:38 00000001000000010000007D
-rw------- 1 postgres postgres 16777216 May 05 09:43 00000001000000010000007E
-rw------- 1 postgres postgres 16777216 May 05 09:48 00000001000000010000007F
-rw------- 1 postgres postgres 16777216 May 05 09:53 000000010000000100000080
-rw------- 1 postgres postgres 16777216 May 05 09:58 000000010000000100000081
-rw------- 1 postgres postgres 16777216 May 05 10:03 000000010000000100000082
-rw------- 1 postgres postgres 16777216 May 05 10:08 000000010000000100000083
-rw------- 1 postgres postgres 16777216 May 05 10:13 000000010000000100000084
-rw------- 1 postgres postgres 16777216 May 05 10:18 000000010000000100000085
-rw------- 1 postgres postgres 16777216 May 05 10:23 000000010000000100000086
-rw------- 1 postgres postgres 16777216 May 05 10:28 000000010000000100000087
-rw------- 1 postgres postgres 16777216 May 05 10:33 000000010000000100000088
-rw------- 1 postgres postgres 16777216 May 05 10:34 000000010000000100000089
-rw------- 1 postgres postgres 252 May 05 10:35 000000010000000100000089.00000020.backup
m.s.
#17 Re : Réplication » Log shipping et WAL/Standby » 04/05/2010 17:47:48
Alors j'ai un problème de compréhension uniquement...
Mon but est d'obtenir une base en WSB.
Je m'attend à ce que mon serveur 2, lorsqu'il a lu tous les journaux disponibles, reste en attente des futurs journaux et ne s'ouvre pas.
Ce serait lors d'un crash de la base 1 que je souhaiterai rendre disponible la base 2...
Qu'ai-je raté ?
m.s. et merci de ton aide
#18 Re : Réplication » Log shipping et WAL/Standby » 04/05/2010 17:28:35
J'ai recommencé toute ma procédure en dissociant, cette fois-ci, le répertoire WAL du PGDATA, afin de ne pas l'écraser lors de la copie.
Au niveau de mon backup, j'ai
pg_start_backup
-----------------
0/B8000020
pg_stop_backup
----------------
0/B9000000
Au niveau de mon pg_xlog source, j'ai
[postgres@gmapdba01] > ls
0000000100000000000000B7
0000000100000000000000B8
0000000100000000000000B8.00000020.backup
0000000100000000000000B9
0000000100000000000000BA
0000000100000000000000BB
0000000100000000000000BC
0000000100000000000000BD
0000000100000000000000BE
archive_status
Au niveau de mon répertoire WAL sur la cible, j'ai
0000000100000000000000B3
0000000100000000000000B7
0000000100000000000000B4
0000000100000000000000B7.00000020.backup
0000000100000000000000B4.00000020.backup
0000000100000000000000B8
0000000100000000000000B5
0000000100000000000000B8.00000020.backup
0000000100000000000000B6
Dans mon fichier recovy.conf sur la cible, avant de démarrer la base, j'ai
restore_command = '/usr/bin/cp "/data/WAL/1P/%f" "%p"'
En redémarrant ma base, j'ai le msg
pg_ctl: another server might be running; trying to start server anyway
server starting
... bien qu'aucun autre serveur ne soit actif sur cette machine et sur ce port
.. et j'ai le log
2010-05-04 17:26:10 DFTLOG: database system was interrupted; last known up at 2010-05-04 17:19:13 DFT
2010-05-04 17:26:10 DFTLOG: starting archive recovery
2010-05-04 17:26:10 DFTLOG: restore_command = '/usr/bin/cp "/data/WAL/1P/%f" "%p"'
cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
2010-05-04 17:26:10 DFTLOG: restored log file "0000000100000000000000B8.00000020.backup" from archive
2010-05-04 17:26:10 DFTLOG: restored log file "0000000100000000000000B8" from archive
2010-05-04 17:26:10 DFTLOG: automatic recovery in progress
2010-05-04 17:26:10 DFTLOG: redo starts at 0/B8000068, consistency will be reached at 0/B9000000
2010-05-04 17:26:10 DFTLOG: restored log file "0000000100000000000000B9" from archive
2010-05-04 17:26:10 DFTLOG: consistent recovery state reached
cp: /data/WAL/1P/0000000100000000000000BA: A file or directory in the path name does not exist.
2010-05-04 17:26:10 DFTLOG: unexpected pageaddr 0/B2000000 in log file 0, segment 186, offset 0
2010-05-04 17:26:10 DFTLOG: redo done at 0/B9000068
2010-05-04 17:26:10 DFTLOG: restored log file "0000000100000000000000B9" from archive
cp: /data/WAL/1P/00000002.history: A file or directory in the path name does not exist.
2010-05-04 17:26:10 DFTLOG: selected new timeline ID: 2
cp: /data/WAL/1P/00000001.history: A file or directory in the path name does not exist.
2010-05-04 17:26:10 DFTLOG: archive recovery complete
2010-05-04 17:26:11 DFTLOG: database system is ready to accept connections
2010-05-04 17:26:11 DFTLOG: autovacuum launcher started
m.s.
#19 Réplication » Log shipping et WAL/Standby » 04/05/2010 15:58:08
- fadace
- Réponses : 16
J'ai installé postresql 8.4.3 sur 2 machines similaires
J'ai configuré sur la base source postgresql.conf avec, entre autres, les paramètre suivants:
archive_mode = on
archive_command = '/usr/bin/scp "%p" machine02:/data/DB/WAL/"%f"'
archive_timeout = 60
J'ai configuré un canal ssh bidirectionnel entre les 2 machines
Les fichiers journaux sont transférés d'une machine à l'autre sans souci : le répertoire WAL a été créé sur les 2 machines.
J'ai fait le transfert comme spécifié dans la doc
psql -U postgres -h machine01 -p 5432 << EOF
SELECT pg_start_backup('debut_backup_wal', true);
EOF
tar -cvf /data/DB.tar /data/DB
psql -U postgres -h machine01 -p 5432 << EOF
SELECT pg_stop_backup();
EOF
gzip /data/DB.tar
scp /data/DB.tar.gz Machine02:/data/
Puis sur la machine 2, arrêt de l'instance à écraser, puis
cd /data
cp DB/*.conf .
gunzip DB.tar.gz
tar -xvf DB.tar
mv *.conf /data/DB/
J'ai bien créé le fichier recovery.conf.
Lorsque je redémarre la 2ème base (standby), j'ai le msg suivant
2010-05-04 15:42:13 DFTLOG: database system was interrupted; last known up at 2010-05-04 15:37:28 DFT
2010-05-04 15:42:13 DFTLOG: starting archive recovery
2010-05-04 15:42:13 DFTLOG: restore_command = '/usr/bin/cp "WAL/%f" "%p"'
cp: WAL/00000001.history: A file or directory in the path name does not exist.
cp: WAL/0000000100000000000000A1.00000020.backup: A file or directory in the path name does not exist.
cp: WAL/0000000100000000000000A1: A file or directory in the path name does not exist.
2010-05-04 15:42:13 DFTLOG: automatic recovery in progress
2010-05-04 15:42:13 DFTLOG: record with zero length at 0/A1000068
2010-05-04 15:42:13 DFTLOG: redo is not required
cp: WAL/0000000100000000000000A1: A file or directory in the path name does not exist.
cp: WAL/00000002.history: A file or directory in the path name does not exist.
2010-05-04 15:42:14 DFTLOG: selected new timeline ID: 2
cp: WAL/00000001.history: A file or directory in the path name does not exist.
2010-05-04 15:42:14 DFTLOG: archive recovery complete
2010-05-04 15:42:14 DFTLOG: autovacuum launcher started
2010-05-04 15:42:14 DFTLOG: database system is ready to accept connections
... et effectivement, je n'ai pas le fichier 0000A1, j'ai les 0000A2, 0000A3, ... mais pas le 0000A1! Sur la machine souce, dans pg_xlog, j'ai par contre un fichier 0000000100000000000000A1.00000020.backup
et pourquoi ma base standby est-elle ouverte ...
Une aide serait la bienvenue...
#20 Re : C et C++ » orafce sur IBM Aix 5.3 TL 11 pour v.8.3.4 » 16/04/2010 10:58:24
[postgres@test01] > bison -d -o sqlparse.c sqlparse.y
[postgres@test01] > echo $?
141
Donc un code retour à 141
[postgres@test01] > gmake install
sed 's,MODULE_PATHNAME,$libdir/orafunc,g' orafunc.sql.in >orafunc.sql
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o convert.o convert.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o file.o file.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o datefce.o datefce.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o magic.o magic.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o others.o others.c
others.c: In function 'appendDatum':
others.c:412: warning: pointer targets in initialization differ in signedness
others.c: In function 'orafce_dump':
others.c:479: warning: format '%d' expects type 'int', but argument 4 has type 'Size'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o plvstr.o plvstr.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o plvdate.o plvdate.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o shmmc.o shmmc.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o plvsubst.o plvsubst.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o utility.o utility.c
bison -d -o sqlparse.c sqlparse.y
gmake: *** [sqlparse.c] Broken pipe
[postgres@test01] > echo $?
2
... et un code retour 2 pour le gmake
Pas de sqlparse.c généré (le sqlparse.y est par contre toujours là)
#21 Re : C et C++ » orafce sur IBM Aix 5.3 TL 11 pour v.8.3.4 » 15/04/2010 09:20:12
On est obligés de faire diplomatique ici, on rencontre quelquefois des gens pas expérimentés du tout?
Donc effectivement, il y a eu clean.
Essayez de ne lancer que la commande bison pour voir le message d'erreur?
Pour l'inexpérimenté sur PG, c'est le cas pour moi.
[postgres@test01] > bison --version
bison (GNU Bison) 1.875
Written by Robert Corbett and Richard Stallman.
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[postgres@test01] > pwd
/home/postgres/postgresql-8.4.3/contrib/orafce
[postgres@test01] > bison -d -o sqlparse.c sqlparse.y
[postgres@test01] >
[postgres@test01] > gmake install
bison -d -o sqlparse.c sqlparse.y
gmake: *** [sqlparse.c] Broken pipe
Pas d'erreur/d'output donc en lançant la commande à la main...
A noter que pour mon problème Slony (http://forums.postgresql.fr/viewtopic.php?id=728), cela semble ressembler...
#22 Re : Réplication » Compilation de Slony 2.0 sous Aix. » 15/04/2010 09:13:50
Saisi...
J'ai recompilé une nouvelle distrib.
J'ai relancé le configure depuis le source Slony, en pointant sur le bon pg_config.
ça avance un peu, jusqu'à un fatidique
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -D_THREAD_SAFE -I../.. -I/opt/postgres/include/ -I/opt/postgres/include/server/ -c -o slony1_funcs.o slony1_funcs.c
slony1_funcs.c: In function 'slon_quote_literal':
slony1_funcs.c:1029: warning: pointer targets in passing argument 1 of 'pg_mblen' differ in signedness
../../makefiles/mkldexport.sh slony1_funcs.o > slony1_funcs.exp
/bin/sh: ../../makefiles/mkldexport.sh: 0403-006 Execute permission denied.
gmake[2]: *** [slony1_funcs.exp] Error 126
rm slony1_funcs.exp
gmake[2]: Leaving directory `/home/postgres/slony1-2.0.2/src/backend'
gmake[1]: *** [install] Error 2
gmake[1]: Leaving directory `/home/postgres/slony1-2.0.2/src'
gmake: *** [install] Error 2
Dans le Makefile.aix, je trouve bien un
MKLDEXPORT=$(slony_top_builddir)/makefiles/mkldexport.sh
... mais celui-ci n'a pas les bons droits. Je modifie donc et renvoie
ls -l mkldexport.sh
-rw-r--r-- 1 postgres postgres 1404 Aug 19 2004 mkldexport.sh
chmod 744 mkldexport.sh
ls -l mkldexport.sh
xrw-r--r-- 1 postgres postgres 1404 Aug 19 2004 mkldexport.sh
cd ..
gmake clean
gmake install
Là, ça avance un bout, puis ça plante sur
...
gmake[2]: Entering directory `/home/postgres/slony1-2.0.2/src/slony_logshipper'
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -D_THREAD_SAFE -D_LARGE_FILES -I../.. -DPGSHARE="\"/opt/postgres/share/\"" -I/opt/postgres/include/ -I/opt/postgres/include/server/ -c -o slony_logshipper.o slony_logshipper.c
slony_logshipper.c: In function 'main':
slony_logshipper.c:476: warning: 'destfname.data' may be used uninitialized in this function
slony_logshipper.c:476: note: 'destfname.data' was declared here
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -D_THREAD_SAFE -D_LARGE_FILES -I../.. -DPGSHARE="\"/opt/postgres/share/\"" -I/opt/postgres/include/ -I/opt/postgres/include/server/ -c -o dbutil.o dbutil.c
gcc -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -D_THREAD_SAFE -D_LARGE_FILES -I../.. -DPGSHARE="\"/opt/postgres/share/\"" -I/opt/postgres/include/ -I/opt/postgres/include/server/ -c -o ipcutil.o ipcutil.c
bison -y -d parser.y
gmake[2]: *** [parser.c] Broken pipe
gmake[2]: Leaving directory `/home/postgres/slony1-2.0.2/src/slony_logshipper'
gmake[1]: *** [install] Error 2
gmake[1]: Leaving directory `/home/postgres/slony1-2.0.2/src'
gmake: *** [install] Error 2
Une idée ? ça ressemble un peu à http://forums.postgresql.fr/viewtopic.p … 4552#p4552 , non ?
Fadace
#23 Re : Réplication » Compilation de Slony 2.0 sous Aix. » 13/04/2010 15:56:46
C'est pourtant dans le INSTALL de Slony que je le découvre
[postgres@test01] > pwd
/home/postgres/slony1-2.0.2
[postgres@test01] > ./configure --with-pgconfigdir=/usr/local/pgsql/bin --enable-thread-safety
configure: WARNING: unrecognized options: --enable-thread-safety
checking build system type... powerpc-ibm-aix5.3.0.0
checking host system type... powerpc-ibm-aix5.3.0.0
checking which template to use... aix
configure: using CFLAGS=
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for perl... /usr/bin/perl
checking for tar... /usr/bin/tar
checking for flex... no
checking for ,... no
checking for lex... lex
checking for bison... bison -y
checking for sed... sed
checking for the pthreads library -lpthreads... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking for cc_r... gcc
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for inttypes.h... (cached) yes
checking for gettimeofday... yes
checking for dup2... yes
checking for alarm... yes
checking for memset... yes
checking for select... yes
checking for strdup... yes
checking for strerror... yes
checking for strtol... yes
checking for strtoul... yes
checking for int32_t... yes
checking for uint32_t... yes
checking for u_int32_t... yes
checking for int64_t... yes
checking for uint64_t... yes
checking for u_int64_t... yes
checking for ssize_t... yes
checking for POSIX signal interface... yes
checking if you have requested slony1-engine building... yes
checking for pg_config... /usr/local/pgsql/bin/pg_config
pg_config says pg_bindir is /usr/local/pgsql/bin/
pg_config says pg_libdir is /usr/local/pgsql/lib/
pg_config says pg_includedir is /usr/local/pgsql/include/
pg_config says pg_pkglibdir is /usr/local/pgsql/lib/
pg_config says pg_includeserverdir is /usr/local/pgsql/include/server/
checking for correct version of PostgreSQL... 8.4
8.4
pg_config says pg_sharedir is /usr/local/pgsql/share/
checking PostgreSQL for enable-thread-safety as required on aix5.3.0.0... no
configure: error: PostgreSQL needs to be compiled with --enable-thread-safety on aix5.3.0.0
#24 Re : C et C++ » orafce sur IBM Aix 5.3 TL 11 pour v.8.3.4 » 13/04/2010 15:52:34
Je présume que vous avez fait un make clean avant de tout recommencer ?
Comme la tournure est diplomatique ;-)
[postgres@test01] > gmake clean
rm -f orafunc.so liborafunc.a liborafunc.exp
rm -f orafunc.sql
rm -f convert.o file.o datefce.o magic.o others.o plvstr.o plvdate.o shmmc.o plvsubst.o utility.o plvlex.o alert.o pipe.o sqlparse.o putline.o assert.o plunit.o
rm -f sqlparse.c sqlparse.h sqlscan.c y.tab.c y.tab.h
rm -rf results tmp_check log
rm -f regression.diffs regression.out regress.out run_check.out
[postgres@test01] > gmake install
sed 's,MODULE_PATHNAME,$libdir/orafunc,g' orafunc.sql.in >orafunc.sql
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o convert.o convert.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o file.o file.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o datefce.o datefce.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o magic.o magic.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o others.o others.c
others.c: In function 'appendDatum':
others.c:412: warning: pointer targets in initialization differ in signedness
others.c: In function 'orafce_dump':
others.c:479: warning: format '%d' expects type 'int', but argument 4 has type 'Size'
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o plvstr.o plvstr.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o plvdate.o plvdate.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o shmmc.o shmmc.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o plvsubst.o plvsubst.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I. -I../../src/include -c -o utility.o utility.c
bison -d -o sqlparse.c sqlparse.y
gmake: *** [sqlparse.c] Broken pipe
#25 Réplication » Compilation de Slony 2.0 sous Aix. » 13/04/2010 14:43:03
- fadace
- Réponses : 4
Bonjour,
Il est spécifié dans INSTALL, que sous Aix et Sun Solaris, l'option --enable-thread-safety doit être settée.
Je tente une compilationd e Slony 2 sur un Postgres 8.4. J'ai bien pris note que seuls la 8.3 est supportée, mais le temps manque et je dois aller de l'avant, donc je tente le coup.
J'exécute donc
./configure --with-pgconfigdir=/usr/local/pgsql/bin --enable-thread-safety
En début d'output, je reçois un superbe
configure: WARNING: unrecognized options: --enable-thread-safety
... et en fin de script, un non moins superbe
checking PostgreSQL for enable-thread-safety as required on aix5.3.0.0... no
configure: error: PostgreSQL needs to be compiled with --enable-thread-safety on aix5.3.0.0
Que fais-je donc de faux ?
m.s.
fadace