summaryrefslogtreecommitdiffstats
path: root/src/test/isolation/expected/nowait-5.out
blob: f1aae21c1fd8277b1605271825ed047cb2a88f8e (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
Parsed test spec with 3 sessions

starting permutation: sl1_prep upd_getlock sl1_exec upd_doupdate lk1_doforshare upd_releaselock
step sl1_prep: 
	PREPARE sl1_run AS SELECT id FROM test_nowait WHERE pg_advisory_lock(0) is not null FOR UPDATE NOWAIT;

step upd_getlock: 
	SELECT pg_advisory_lock(0);

pg_advisory_lock
----------------
                
(1 row)

step sl1_exec: 
	BEGIN ISOLATION LEVEL READ COMMITTED;
	EXECUTE sl1_run;
	SELECT xmin, xmax, ctid, * FROM test_nowait;
 <waiting ...>
step upd_doupdate: 
	BEGIN ISOLATION LEVEL READ COMMITTED;
	UPDATE test_nowait SET value = value WHERE id % 2 = 0;
	COMMIT;

step lk1_doforshare: 
	BEGIN ISOLATION LEVEL READ COMMITTED;
	SELECT id FROM test_nowait WHERE id % 2 = 0 FOR SHARE;

id
--
 2
(1 row)

step upd_releaselock: 
	SELECT pg_advisory_unlock(0);

pg_advisory_unlock
------------------
t                 
(1 row)

step sl1_exec: <... completed>
ERROR:  could not obtain lock on row in relation "test_nowait"