summaryrefslogtreecommitdiff
path: root/src/test/isolation/expected
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-10-18 13:37:09 +0100
committerSimon Riggs <simon@2ndQuadrant.com>2012-10-18 13:37:09 +0100
commit4e206744dc4bb21f583ff35893cf826a04f6c64b (patch)
treeefe1f0cdec3cd8a7a83c48958b41d1bed5ffab0f /src/test/isolation/expected
parentff3f9c8de5846be7709b7a87654631b4c309a68b (diff)
downloadpostgresql-4e206744dc4bb21f583ff35893cf826a04f6c64b.tar.gz
Add isolation tests for DROP INDEX CONCURRENTLY.
Backpatch to 9.2 to ensure bugs are fixed. Abhijit Menon-Sen
Diffstat (limited to 'src/test/isolation/expected')
-rw-r--r--src/test/isolation/expected/drop-index-concurrently-1.out36
-rw-r--r--src/test/isolation/expected/drop-index-concurrently-2.out24
2 files changed, 60 insertions, 0 deletions
diff --git a/src/test/isolation/expected/drop-index-concurrently-1.out b/src/test/isolation/expected/drop-index-concurrently-1.out
new file mode 100644
index 0000000000..c42ac91f8b
--- /dev/null
+++ b/src/test/isolation/expected/drop-index-concurrently-1.out
@@ -0,0 +1,36 @@
+Parsed test spec with 3 sessions
+
+starting permutation: noseq prepi preps begin explaini explains select2 drop insert2 end2 selecti selects end
+step noseq: SET enable_seqscan = false;
+step prepi: PREPARE getrow_idx AS SELECT * FROM test_dc WHERE data=34;
+step preps: PREPARE getrow_seq AS SELECT * FROM test_dc WHERE data::text=34::text;
+step begin: BEGIN;
+step explaini: EXPLAIN (COSTS OFF) EXECUTE getrow_idx;
+QUERY PLAN
+
+Index Scan using test_dc_data on test_dc
+ Index Cond: (data = 34)
+step explains: EXPLAIN (COSTS OFF) EXECUTE getrow_seq;
+QUERY PLAN
+
+Seq Scan on test_dc
+ Filter: ((data)::text = '34'::text)
+step select2: SELECT * FROM test_dc WHERE data=34;
+id data
+
+34 34
+step drop: DROP INDEX CONCURRENTLY test_dc_data; <waiting ...>
+step insert2: INSERT INTO test_dc(data) SELECT * FROM generate_series(1, 100);
+step end2: COMMIT;
+step selecti: EXECUTE getrow_idx;
+id data
+
+34 34
+134 34
+step selects: EXECUTE getrow_seq;
+id data
+
+34 34
+134 34
+step end: COMMIT;
+step drop: <... completed>
diff --git a/src/test/isolation/expected/drop-index-concurrently-2.out b/src/test/isolation/expected/drop-index-concurrently-2.out
new file mode 100644
index 0000000000..4802777623
--- /dev/null
+++ b/src/test/isolation/expected/drop-index-concurrently-2.out
@@ -0,0 +1,24 @@
+Parsed test spec with 3 sessions
+
+starting permutation: explain drop cancel rollback droptab selecti dropi
+step explain: EXPLAIN (COSTS OFF) SELECT * FROM test_dc WHERE data=34343;
+QUERY PLAN
+
+Bitmap Heap Scan on test_dc
+ Recheck Cond: (data = 34343)
+ -> Bitmap Index Scan on test_dc_data
+ Index Cond: (data = 34343)
+step drop: DROP INDEX CONCURRENTLY test_dc_data; <waiting ...>
+step cancel: SELECT pg_cancel_backend(pid) FROM pg_stat_activity WHERE query = 'DROP INDEX CONCURRENTLY test_dc_data;';
+pg_cancel_backend
+
+t
+step drop: <... completed>
+error in steps cancel drop: ERROR: canceling statement due to user request
+step rollback: ROLLBACK;
+step droptab: DROP TABLE test_dc;
+step selecti: SELECT indexrelid::regclass, indisvalid, indisready FROM pg_index WHERE indexrelid = 'test_dc_data'::regclass;
+indexrelid indisvalid indisready
+
+test_dc_data f f
+step dropi: DROP INDEX test_dc_data;