Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 48637a7

Browse files
committed
Update expected test results due to commit fd7bc10ab4c6
Upstream have added new test for CREATE INDEX CONCURRENTLY which expectedly do not work in multimaster
1 parent 568b13e commit 48637a7

File tree

1 file changed

+164
-13
lines changed

1 file changed

+164
-13
lines changed

expected/regression_ee.diff

+164-13
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,19 @@ diff ../../../src/test/regress/expected/create_index.out ../tmp_check/regress_ou
6868
-ERROR: CREATE INDEX CONCURRENTLY cannot run inside a transaction block
6969
+ERROR: multimaster doesn't support CREATE INDEX CONCURRENTLY
7070
COMMIT;
71+
-- test where predicate is able to do a transactional update during
72+
-- a concurrent build before switching pg_index state flags.
73+
@@ -1403,7 +1405,9 @@
74+
END; $$;
75+
CREATE INDEX CONCURRENTLY concur_index8 ON concur_heap (f1)
76+
WHERE predicate_stable();
77+
+ERROR: multimaster doesn't support CREATE INDEX CONCURRENTLY
78+
DROP INDEX concur_index8;
79+
+ERROR: index "concur_index8" does not exist
80+
DROP FUNCTION predicate_stable();
7181
-- But you can do a regular index build in a transaction
7282
BEGIN;
73-
@@ -1400,8 +1402,6 @@
83+
@@ -1412,8 +1416,6 @@
7484
-- Failed builds are left invalid by VACUUM FULL, fixed by REINDEX
7585
VACUUM FULL concur_heap;
7686
REINDEX TABLE concur_heap;
@@ -79,7 +89,7 @@ diff ../../../src/test/regress/expected/create_index.out ../tmp_check/regress_ou
7989
DELETE FROM concur_heap WHERE f1 = 'b';
8090
VACUUM FULL concur_heap;
8191
\d concur_heap
82-
@@ -1411,12 +1411,6 @@
92+
@@ -1423,12 +1425,6 @@
8393
f1 | text | | |
8494
f2 | text | | |
8595
Indexes:
@@ -92,7 +102,7 @@ diff ../../../src/test/regress/expected/create_index.out ../tmp_check/regress_ou
92102
"std_index" btree (f2)
93103

94104
REINDEX TABLE concur_heap;
95-
@@ -1427,12 +1421,6 @@
105+
@@ -1439,12 +1435,6 @@
96106
f1 | text | | |
97107
f2 | text | | |
98108
Indexes:
@@ -105,7 +115,7 @@ diff ../../../src/test/regress/expected/create_index.out ../tmp_check/regress_ou
105115
"std_index" btree (f2)
106116

107117
-- Temporary tables with concurrent builds and on-commit actions
108-
@@ -1442,7 +1430,9 @@
118+
@@ -1454,7 +1444,9 @@
109119
ON COMMIT PRESERVE ROWS;
110120
INSERT INTO concur_temp VALUES (1, 'foo'), (2, 'bar');
111121
CREATE INDEX CONCURRENTLY concur_temp_ind ON concur_temp(f1);
@@ -115,7 +125,7 @@ diff ../../../src/test/regress/expected/create_index.out ../tmp_check/regress_ou
115125
DROP TABLE concur_temp;
116126
-- ON COMMIT DROP
117127
BEGIN;
118-
@@ -1451,34 +1441,42 @@
128+
@@ -1463,34 +1455,42 @@
119129
INSERT INTO concur_temp VALUES (1, 'foo'), (2, 'bar');
120130
-- Fails when running in a transaction.
121131
CREATE INDEX CONCURRENTLY concur_temp_ind ON concur_temp(f1);
@@ -162,7 +172,7 @@ diff ../../../src/test/regress/expected/create_index.out ../tmp_check/regress_ou
162172
\d concur_heap
163173
Table "public.concur_heap"
164174
Column | Type | Collation | Nullable | Default
165-
@@ -2416,46 +2414,38 @@
175+
@@ -2428,46 +2428,38 @@
166176
INSERT INTO concur_reindex_tab4 VALUES (1), (1), (2);
167177
-- This trick creates an invalid index.
168178
CREATE UNIQUE INDEX CONCURRENTLY concur_reindex_ind5 ON concur_reindex_tab4 (c1);
@@ -374,7 +384,36 @@ diff ../../../src/test/regress/expected/transactions.out ../tmp_check/regress_ou
374384
COMMIT;
375385
START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
376386
SHOW transaction_isolation;
377-
@@ -841,17 +829,14 @@
387+
@@ -796,24 +784,13 @@
388+
389+
SAVEPOINT x;
390+
COMMIT AND CHAIN; -- TBLOCK_SUBCOMMIT
391+
+ERROR: [MTM] COMMIT AND CHAIN is not supported
392+
SHOW transaction_isolation;
393+
- transaction_isolation
394+
------------------------
395+
- repeatable read
396+
-(1 row)
397+
-
398+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
399+
SHOW transaction_read_only;
400+
- transaction_read_only
401+
------------------------
402+
- off
403+
-(1 row)
404+
-
405+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
406+
SHOW transaction_deferrable;
407+
- transaction_deferrable
408+
-------------------------
409+
- on
410+
-(1 row)
411+
-
412+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
413+
COMMIT;
414+
-- different mix of options just for fun
415+
START TRANSACTION ISOLATION LEVEL SERIALIZABLE, READ WRITE, NOT DEFERRABLE;
416+
@@ -881,17 +858,14 @@
378417
ROLLBACK;
379418
-- not allowed outside a transaction block
380419
COMMIT AND CHAIN; -- error
@@ -394,7 +433,7 @@ diff ../../../src/test/regress/expected/transactions.out ../tmp_check/regress_ou
394433

395434
RESET default_transaction_read_only;
396435
DROP TABLE abc;
397-
@@ -941,7 +926,7 @@
436+
@@ -981,7 +955,7 @@
398437
SELECT 1\; BEGIN\; SAVEPOINT sp\; ROLLBACK TO SAVEPOINT sp\; COMMIT;
399438
-- Tests for AND CHAIN in implicit transaction blocks
400439
SET TRANSACTION READ ONLY\; COMMIT AND CHAIN; -- error
@@ -403,7 +442,7 @@ diff ../../../src/test/regress/expected/transactions.out ../tmp_check/regress_ou
403442
SHOW transaction_read_only;
404443
transaction_read_only
405444
-----------------------
406-
@@ -960,23 +945,20 @@
445+
@@ -1000,23 +974,20 @@
407446
-- COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
408447
INSERT INTO abc VALUES (7)\; COMMIT\; INSERT INTO abc VALUES (8)\; COMMIT AND CHAIN; -- 7 commit, 8 error
409448
WARNING: there is no transaction in progress
@@ -431,7 +470,7 @@ diff ../../../src/test/regress/expected/transactions.out ../tmp_check/regress_ou
431470
COMMIT;
432471
START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTO abc VALUES (16)\; ROLLBACK AND CHAIN; -- 16 ok
433472
SHOW transaction_isolation; -- transaction is active at this point
434-
@@ -988,7 +970,7 @@
473+
@@ -1028,7 +999,7 @@
435474
ROLLBACK;
436475
-- START TRANSACTION + COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
437476
START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTO abc VALUES (17)\; COMMIT\; INSERT INTO abc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error
@@ -440,7 +479,7 @@ diff ../../../src/test/regress/expected/transactions.out ../tmp_check/regress_ou
440479
SHOW transaction_isolation; -- out of transaction block
441480
transaction_isolation
442481
-----------------------
443-
@@ -1007,9 +989,8 @@
482+
@@ -1047,9 +1018,8 @@
444483
a
445484
----
446485
7
@@ -554,6 +593,118 @@ diff ../../../src/test/regress/expected/atx5.out ../tmp_check/regress_outdir/res
554593
SET client_min_messages = 'warning';
555594
DROP FUNCTION IF EXISTS atx_test_30_one();
556595
DROP FUNCTION IF EXISTS atx_test_30_two();
596+
diff ../../../src/test/regress/expected/atx9.out ../tmp_check/regress_outdir/results/atx9.out
597+
--- ../../../src/test/regress/expected/atx9.out CENSORED
598+
+++ ../tmp_check/regress_outdir/results/atx9.out CENSORED
599+
@@ -29,50 +29,38 @@
600+
INSERT INTO abc VALUES (1);
601+
INSERT INTO abc VALUES (2);
602+
COMMIT AND CHAIN; -- TBLOCK_END
603+
+ERROR: [MTM] COMMIT AND CHAIN is not supported
604+
SHOW transaction_isolation;
605+
- transaction_isolation
606+
------------------------
607+
- repeatable read
608+
-(1 row)
609+
-
610+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
611+
SHOW transaction_read_only;
612+
- transaction_read_only
613+
------------------------
614+
- off
615+
-(1 row)
616+
-
617+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
618+
SHOW transaction_deferrable;
619+
- transaction_deferrable
620+
-------------------------
621+
- on
622+
-(1 row)
623+
-
624+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
625+
INSERT INTO abc VALUES ('error');
626+
-ERROR: invalid input syntax for type integer: "error"
627+
-LINE 1: INSERT INTO abc VALUES ('error');
628+
- ^
629+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
630+
INSERT INTO abc VALUES (3); -- check it's really aborted
631+
ERROR: current transaction is aborted, commands ignored until end of transaction block
632+
COMMIT AND CHAIN; -- TBLOCK_ABORT_END
633+
SHOW transaction_isolation;
634+
transaction_isolation
635+
-----------------------
636+
- repeatable read
637+
+ read committed
638+
(1 row)
639+
640+
SHOW transaction_read_only;
641+
transaction_read_only
642+
-----------------------
643+
- off
644+
+ on
645+
(1 row)
646+
647+
SHOW transaction_deferrable;
648+
transaction_deferrable
649+
------------------------
650+
- on
651+
+ off
652+
(1 row)
653+
654+
INSERT INTO abc VALUES (4);
655+
+ERROR: cannot execute INSERT in a read-only transaction
656+
COMMIT;
657+
ROLLBACK;
658+
BEGIN;
659+
@@ -144,24 +132,13 @@
660+
661+
SAVEPOINT x;
662+
COMMIT AND CHAIN; -- TBLOCK_SUBCOMMIT
663+
+ERROR: [MTM] COMMIT AND CHAIN is not supported
664+
SHOW transaction_isolation;
665+
- transaction_isolation
666+
------------------------
667+
- repeatable read
668+
-(1 row)
669+
-
670+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
671+
SHOW transaction_read_only;
672+
- transaction_read_only
673+
------------------------
674+
- off
675+
-(1 row)
676+
-
677+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
678+
SHOW transaction_deferrable;
679+
- transaction_deferrable
680+
-------------------------
681+
- on
682+
-(1 row)
683+
-
684+
+ERROR: current transaction is aborted, commands ignored until end of transaction block
685+
COMMIT;
686+
ROLLBACK;
687+
-- different mix of options just for fun
688+
@@ -232,17 +209,14 @@
689+
COMMIT;
690+
-- not allowed outside a transaction block
691+
COMMIT AUTONOMOUS AND CHAIN; -- error
692+
-ERROR: COMMIT AND CHAIN can only be used in transaction blocks
693+
+ERROR: [MTM] COMMIT AND CHAIN is not supported
694+
ROLLBACK AUTONOMOUS AND CHAIN; -- error
695+
ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
696+
SELECT * FROM abc ORDER BY 1;
697+
a
698+
---
699+
- 1
700+
- 2
701+
- 4
702+
5
703+
-(4 rows)
704+
+(1 row)
705+
706+
RESET default_transaction_read_only;
707+
DROP TABLE abc;
557708
diff ../../../src/test/regress/expected/rules.out ../tmp_check/regress_outdir/results/rules.out
558709
--- ../../../src/test/regress/expected/rules.out CENSORED
559710
+++ ../tmp_check/regress_outdir/results/rules.out CENSORED
@@ -632,7 +783,7 @@ diff ../../../src/test/regress/expected/rules.out ../tmp_check/regress_outdir/re
632783
UNION ALL
633784
SELECT l.objoid,
634785
l.classoid,
635-
@@ -2065,7 +2085,7 @@
786+
@@ -2066,7 +2086,7 @@
636787
st.last_msg_receipt_time,
637788
st.latest_end_lsn,
638789
st.latest_end_time
@@ -641,7 +792,7 @@ diff ../../../src/test/regress/expected/rules.out ../tmp_check/regress_outdir/re
641792
LEFT JOIN pg_stat_get_subscription(NULL::oid) st(subid, relid, pid, received_lsn, last_msg_send_time, last_msg_receipt_time, latest_end_lsn, latest_end_time) ON ((st.subid = su.oid)));
642793
pg_stat_sys_indexes| SELECT pg_stat_all_indexes.relid,
643794
pg_stat_all_indexes.indexrelid,
644-
@@ -2407,6 +2427,17 @@
795+
@@ -2408,6 +2428,17 @@
645796
FROM (unnest(s.stxkeys) k(k)
646797
JOIN pg_attribute a ON (((a.attrelid = s.stxrelid) AND (a.attnum = k.k))))
647798
WHERE (NOT has_column_privilege(c.oid, a.attnum, 'select'::text))))) AND ((c.relrowsecurity = false) OR (NOT row_security_active(c.oid))));

0 commit comments

Comments
 (0)