Bonjour,
J'ai un petit problème j'ai 2 sessions différentes et je fais
Session 1:
Session 2 :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 #BEGIN # select * from i where i=1 for update nowait; i --- 1 (1 row) # select * from i where i=2 for update nowait; i --- 2 (1 row)
Et voici le problème, une fois que j'ai eut un " ERROR: could not obtain lock on row in relation "i" " je ne peux plus rien faire a moins de faire un Commit ou un Rollback, mais je ne veux pas perdre le(s) bloquage(s) que j'ai pratiquer avant (ici bloquage de l'enregistrement i=3)
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 #BEGIN # select * from i where i=3 for update nowait; i --- 3 -- J'arrive bien à bloquer un enregistrement # select * from i where i=1 for update nowait; ERROR: could not obtain lock on row in relation "i" -- Jusque là normal j'essai de bloquer un enregistrement déja bloqué # select * from i where i=4 for update nowait; ERROR: current transaction is aborted, commands ignored until end of transaction block
Si quelqu'un a une solution a ce problème cela m'aiderait beaucoup.
Merci d'avance
Partager