Skip to content

Commit 13d2693

Browse files
committed
Fix some answer files
1 parent 860d050 commit 13d2693

File tree

5 files changed

+109
-66
lines changed

5 files changed

+109
-66
lines changed

src/test/regress/expected/bfv_dd.out

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,9 @@ INFO: (slice 2) Dispatch command to SINGLE content
888888

889889
-- subqueries
890890
select * from dd_singlecol_1 t1 where a=1 and b < (select count(*) from dd_singlecol_2 t2 where t2.a=t1.a);
891-
INFO: (slice 2) Dispatch command to ALL contents: 0 1 2
891+
INFO: (slice 3) Dispatch command to ALL contents: 0 1 2
892892
INFO: (slice 1) Dispatch command to ALL contents: 0 1 2
893+
INFO: (slice 2) Dispatch command to SINGLE content
893894
a | b
894895
---+---
895896
(0 rows)

src/test/regress/expected/bfv_dml.out

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,12 @@ select * from update_pk_test order by 1,2;
199199
(1 row)
200200

201201
explain update update_pk_test set a = 5;
202-
QUERY PLAN
203-
--------------------------------------------------------------------------------------------------
204-
Update on update_pk_test (cost=0.00..1.05 rows=1 width=22)
205-
-> Explicit Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..1.05 rows=1 width=22)
206-
-> Split (cost=0.00..1.01 rows=1 width=22)
207-
-> Seq Scan on update_pk_test (cost=0.00..1.01 rows=1 width=22)
202+
QUERY PLAN
203+
---------------------------------------------------------------------------------------------------------
204+
Update on update_pk_test (cost=0.00..1469.00 rows=0 width=0)
205+
-> Explicit Redistribute Motion 3:3 (slice1; segments: 3) (cost=0.00..1469.00 rows=57400 width=18)
206+
-> Split Update (cost=0.00..321.00 rows=57400 width=18)
207+
-> Seq Scan on update_pk_test (cost=0.00..321.00 rows=28700 width=18)
208208
Optimizer: Postgres query optimizer
209209
(5 rows)
210210

src/test/regress/expected/expand_table.out

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,10 +913,12 @@ CREATE TABLE expand_table2(a int) distributed by (a);
913913
CREATE VIEW expand_view AS select * from expand_table1;
914914
CREATE rule "_RETURN" AS ON SELECT TO expand_table2
915915
DO INSTEAD SELECT * FROM expand_table1;
916+
ERROR: relation "expand_table2" cannot have ON SELECT rules
917+
DETAIL: This operation is not supported for tables.
916918
ALTER TABLE expand_table2 EXPAND TABLE;
917-
ERROR: "expand_table2" is not a table, materialized view, or foreign table
918919
ALTER TABLE expand_view EXPAND TABLE;
919-
ERROR: "expand_view" is not a table, materialized view, or foreign table
920+
ERROR: ALTER action ALTER COLUMN ... EXPAND TABLE cannot be performed on relation "expand_view"
921+
DETAIL: This operation is not supported for views.
920922
ALTER TABLE expand_table1 EXPAND TABLE;
921923
--
922924
-- Test expanding a table with a domain type as distribution key.

src/test/regress/expected/partition_locking.out

Lines changed: 92 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ select * from locktest_master where coalesce not like 'gp_%' and coalesce not li
9191
toast index | AccessExclusiveLock | relation | master
9292
toast index | AccessExclusiveLock | relation | master
9393
toast index | AccessExclusiveLock | relation | master
94+
toast table | AccessExclusiveLock | relation | master
95+
toast table | AccessExclusiveLock | relation | master
96+
toast table | AccessExclusiveLock | relation | master
97+
toast table | AccessExclusiveLock | relation | master
98+
toast table | AccessExclusiveLock | relation | master
99+
toast table | AccessExclusiveLock | relation | master
100+
toast table | AccessExclusiveLock | relation | master
101+
toast table | AccessExclusiveLock | relation | master
102+
toast table | AccessExclusiveLock | relation | master
94103
toast table | ShareLock | relation | master
95104
toast table | ShareLock | relation | master
96105
toast table | ShareLock | relation | master
@@ -100,7 +109,7 @@ select * from locktest_master where coalesce not like 'gp_%' and coalesce not li
100109
toast table | ShareLock | relation | master
101110
toast table | ShareLock | relation | master
102111
toast table | ShareLock | relation | master
103-
(28 rows)
112+
(37 rows)
104113

105114
select * from locktest_segments where coalesce not like 'gp_%' and coalesce not like 'pg_%';
106115
coalesce | mode | locktype | node
@@ -115,25 +124,34 @@ select * from locktest_segments where coalesce not like 'gp_%' and coalesce not
115124
partlockt_1_prt_7 | AccessExclusiveLock | relation | n segments
116125
partlockt_1_prt_8 | AccessExclusiveLock | relation | n segments
117126
partlockt_1_prt_9 | AccessExclusiveLock | relation | n segments
127+
toast table | AccessExclusiveLock | relation | n segments
118128
toast table | ShareLock | relation | n segments
119129
toast index | AccessExclusiveLock | relation | n segments
130+
toast table | AccessExclusiveLock | relation | n segments
120131
toast table | ShareLock | relation | n segments
121132
toast index | AccessExclusiveLock | relation | n segments
133+
toast table | AccessExclusiveLock | relation | n segments
122134
toast table | ShareLock | relation | n segments
123135
toast index | AccessExclusiveLock | relation | n segments
136+
toast table | AccessExclusiveLock | relation | n segments
124137
toast table | ShareLock | relation | n segments
125138
toast index | AccessExclusiveLock | relation | n segments
139+
toast table | AccessExclusiveLock | relation | n segments
126140
toast table | ShareLock | relation | n segments
127141
toast index | AccessExclusiveLock | relation | n segments
142+
toast table | AccessExclusiveLock | relation | n segments
128143
toast table | ShareLock | relation | n segments
129144
toast index | AccessExclusiveLock | relation | n segments
145+
toast table | AccessExclusiveLock | relation | n segments
130146
toast table | ShareLock | relation | n segments
131147
toast index | AccessExclusiveLock | relation | n segments
148+
toast table | AccessExclusiveLock | relation | n segments
132149
toast table | ShareLock | relation | n segments
133150
toast index | AccessExclusiveLock | relation | n segments
151+
toast table | AccessExclusiveLock | relation | n segments
134152
toast table | ShareLock | relation | n segments
135153
toast index | AccessExclusiveLock | relation | n segments
136-
(28 rows)
154+
(37 rows)
137155

138156
commit;
139157
-- select
@@ -245,17 +263,26 @@ HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sur
245263
select * from locktest_master where coalesce not like 'gp_%' and coalesce not like 'pg_%';
246264
coalesce | mode | locktype | node
247265
-------------------+---------------------+----------+--------
266+
aoseg table | AccessExclusiveLock | relation | master
267+
aoseg table | AccessExclusiveLock | relation | master
268+
aoseg table | AccessExclusiveLock | relation | master
269+
aovisimap table | AccessExclusiveLock | relation | master
270+
aovisimap table | AccessExclusiveLock | relation | master
271+
aovisimap table | AccessExclusiveLock | relation | master
248272
partlockt | AccessExclusiveLock | relation | master
249273
partlockt_1_prt_1 | AccessExclusiveLock | relation | master
250274
partlockt_1_prt_2 | AccessExclusiveLock | relation | master
251275
partlockt_1_prt_3 | AccessExclusiveLock | relation | master
252276
toast index | AccessExclusiveLock | relation | master
253277
toast index | AccessExclusiveLock | relation | master
254278
toast index | AccessExclusiveLock | relation | master
279+
toast table | AccessExclusiveLock | relation | master
280+
toast table | AccessExclusiveLock | relation | master
281+
toast table | AccessExclusiveLock | relation | master
255282
toast table | ShareLock | relation | master
256283
toast table | ShareLock | relation | master
257284
toast table | ShareLock | relation | master
258-
(10 rows)
285+
(19 rows)
259286

260287
select * from locktest_segments where coalesce not like 'gp_%' and coalesce not like 'pg_%';
261288
coalesce | mode | locktype | node
@@ -264,13 +291,22 @@ select * from locktest_segments where coalesce not like 'gp_%' and coalesce not
264291
partlockt_1_prt_1 | AccessExclusiveLock | relation | n segments
265292
partlockt_1_prt_2 | AccessExclusiveLock | relation | n segments
266293
partlockt_1_prt_3 | AccessExclusiveLock | relation | n segments
294+
aoseg table | AccessExclusiveLock | relation | n segments
295+
aoseg table | AccessExclusiveLock | relation | n segments
296+
aoseg table | AccessExclusiveLock | relation | n segments
297+
aovisimap table | AccessExclusiveLock | relation | n segments
298+
aovisimap table | AccessExclusiveLock | relation | n segments
299+
aovisimap table | AccessExclusiveLock | relation | n segments
300+
toast table | AccessExclusiveLock | relation | n segments
267301
toast table | ShareLock | relation | n segments
268302
toast index | AccessExclusiveLock | relation | n segments
303+
toast table | AccessExclusiveLock | relation | n segments
269304
toast table | ShareLock | relation | n segments
270305
toast index | AccessExclusiveLock | relation | n segments
306+
toast table | AccessExclusiveLock | relation | n segments
271307
toast table | ShareLock | relation | n segments
272308
toast index | AccessExclusiveLock | relation | n segments
273-
(10 rows)
309+
(19 rows)
274310

275311
commit;
276312
begin;
@@ -361,54 +397,56 @@ HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sur
361397
begin;
362398
create index partlockt_idx on partlockt(i);
363399
select * from locktest_master where coalesce not like 'gp_%' and coalesce not like 'pg_%';
364-
coalesce | mode | locktype | node
365-
-------------------------+---------------------+----------+--------
366-
partlockt | ShareLock | relation | master
367-
partlockt_1_prt_1 | ShareLock | relation | master
368-
partlockt_1_prt_1_i_idx | AccessExclusiveLock | relation | master
369-
partlockt_1_prt_2 | ShareLock | relation | master
370-
partlockt_1_prt_2_i_idx | AccessExclusiveLock | relation | master
371-
partlockt_1_prt_3 | ShareLock | relation | master
372-
partlockt_1_prt_3_i_idx | AccessExclusiveLock | relation | master
373-
partlockt_1_prt_4 | ShareLock | relation | master
374-
partlockt_1_prt_4_i_idx | AccessExclusiveLock | relation | master
375-
partlockt_1_prt_5 | ShareLock | relation | master
376-
partlockt_1_prt_5_i_idx | AccessExclusiveLock | relation | master
377-
partlockt_1_prt_6 | ShareLock | relation | master
378-
partlockt_1_prt_6_i_idx | AccessExclusiveLock | relation | master
379-
partlockt_1_prt_7 | ShareLock | relation | master
380-
partlockt_1_prt_7_i_idx | AccessExclusiveLock | relation | master
381-
partlockt_1_prt_8 | ShareLock | relation | master
382-
partlockt_1_prt_8_i_idx | AccessExclusiveLock | relation | master
383-
partlockt_1_prt_9 | ShareLock | relation | master
384-
partlockt_1_prt_9_i_idx | AccessExclusiveLock | relation | master
385-
partlockt_idx | AccessExclusiveLock | relation | master
386-
(20 rows)
400+
coalesce | mode | locktype | node
401+
-------------------------+--------------------------+----------+--------
402+
partlockt | ShareLock | relation | master
403+
partlockt_1_prt_1 | ShareLock | relation | master
404+
partlockt_1_prt_1_i_idx | AccessExclusiveLock | relation | master
405+
partlockt_1_prt_2 | ShareLock | relation | master
406+
partlockt_1_prt_2_i_idx | AccessExclusiveLock | relation | master
407+
partlockt_1_prt_3 | ShareLock | relation | master
408+
partlockt_1_prt_3_i_idx | AccessExclusiveLock | relation | master
409+
partlockt_1_prt_4 | ShareLock | relation | master
410+
partlockt_1_prt_4_i_idx | AccessExclusiveLock | relation | master
411+
partlockt_1_prt_5 | ShareLock | relation | master
412+
partlockt_1_prt_5_i_idx | AccessExclusiveLock | relation | master
413+
partlockt_1_prt_6 | ShareLock | relation | master
414+
partlockt_1_prt_6_i_idx | AccessExclusiveLock | relation | master
415+
partlockt_1_prt_7 | ShareLock | relation | master
416+
partlockt_1_prt_7_i_idx | AccessExclusiveLock | relation | master
417+
partlockt_1_prt_8 | ShareLock | relation | master
418+
partlockt_1_prt_8_i_idx | AccessExclusiveLock | relation | master
419+
partlockt_1_prt_9 | ShareLock | relation | master
420+
partlockt_1_prt_9_i_idx | AccessExclusiveLock | relation | master
421+
partlockt_idx | AccessExclusiveLock | relation | master
422+
partlockt_idx | ShareUpdateExclusiveLock | relation | master
423+
(21 rows)
387424

388425
select * from locktest_segments where coalesce not like 'gp_%' and coalesce not like 'pg_%';
389-
coalesce | mode | locktype | node
390-
-------------------------+---------------------+----------+------------
391-
partlockt | ShareLock | relation | n segments
392-
partlockt_1_prt_1 | ShareLock | relation | n segments
393-
partlockt_1_prt_1_i_idx | AccessExclusiveLock | relation | n segments
394-
partlockt_1_prt_2 | ShareLock | relation | n segments
395-
partlockt_1_prt_2_i_idx | AccessExclusiveLock | relation | n segments
396-
partlockt_1_prt_3 | ShareLock | relation | n segments
397-
partlockt_1_prt_3_i_idx | AccessExclusiveLock | relation | n segments
398-
partlockt_1_prt_4 | ShareLock | relation | n segments
399-
partlockt_1_prt_4_i_idx | AccessExclusiveLock | relation | n segments
400-
partlockt_1_prt_5 | ShareLock | relation | n segments
401-
partlockt_1_prt_5_i_idx | AccessExclusiveLock | relation | n segments
402-
partlockt_1_prt_6 | ShareLock | relation | n segments
403-
partlockt_1_prt_6_i_idx | AccessExclusiveLock | relation | n segments
404-
partlockt_1_prt_7 | ShareLock | relation | n segments
405-
partlockt_1_prt_7_i_idx | AccessExclusiveLock | relation | n segments
406-
partlockt_1_prt_8 | ShareLock | relation | n segments
407-
partlockt_1_prt_8_i_idx | AccessExclusiveLock | relation | n segments
408-
partlockt_1_prt_9 | ShareLock | relation | n segments
409-
partlockt_1_prt_9_i_idx | AccessExclusiveLock | relation | n segments
410-
partlockt_idx | AccessExclusiveLock | relation | n segments
411-
(20 rows)
426+
coalesce | mode | locktype | node
427+
-------------------------+--------------------------+----------+------------
428+
partlockt | ShareLock | relation | n segments
429+
partlockt_1_prt_1 | ShareLock | relation | n segments
430+
partlockt_1_prt_1_i_idx | AccessExclusiveLock | relation | n segments
431+
partlockt_1_prt_2 | ShareLock | relation | n segments
432+
partlockt_1_prt_2_i_idx | AccessExclusiveLock | relation | n segments
433+
partlockt_1_prt_3 | ShareLock | relation | n segments
434+
partlockt_1_prt_3_i_idx | AccessExclusiveLock | relation | n segments
435+
partlockt_1_prt_4 | ShareLock | relation | n segments
436+
partlockt_1_prt_4_i_idx | AccessExclusiveLock | relation | n segments
437+
partlockt_1_prt_5 | ShareLock | relation | n segments
438+
partlockt_1_prt_5_i_idx | AccessExclusiveLock | relation | n segments
439+
partlockt_1_prt_6 | ShareLock | relation | n segments
440+
partlockt_1_prt_6_i_idx | AccessExclusiveLock | relation | n segments
441+
partlockt_1_prt_7 | ShareLock | relation | n segments
442+
partlockt_1_prt_7_i_idx | AccessExclusiveLock | relation | n segments
443+
partlockt_1_prt_8 | ShareLock | relation | n segments
444+
partlockt_1_prt_8_i_idx | AccessExclusiveLock | relation | n segments
445+
partlockt_1_prt_9 | ShareLock | relation | n segments
446+
partlockt_1_prt_9_i_idx | AccessExclusiveLock | relation | n segments
447+
partlockt_idx | AccessExclusiveLock | relation | n segments
448+
partlockt_idx | ShareUpdateExclusiveLock | relation | n segments
449+
(21 rows)
412450

413451
commit;
414452
-- Force use of the index in the select and delete below. We're not interested
@@ -429,7 +467,8 @@ select * from locktest_master where coalesce not like 'gp_%' and coalesce not li
429467
partlockt | AccessShareLock | relation | master
430468
partlockt_1_prt_1 | AccessShareLock | relation | master
431469
partlockt_1_prt_1_i_idx | AccessShareLock | relation | master
432-
(3 rows)
470+
partlockt_idx | AccessShareLock | relation | master
471+
(4 rows)
433472

434473
select * from locktest_segments where coalesce not like 'gp_%' and coalesce not like 'pg_%';
435474
coalesce | mode | locktype | node
@@ -481,7 +520,8 @@ select * from locktest_master where coalesce not like 'gp_%' and coalesce not li
481520
partlockt | ExclusiveLock | relation | master
482521
partlockt_1_prt_4 | ExclusiveLock | relation | master
483522
partlockt_1_prt_4_i_idx | ExclusiveLock | relation | master
484-
(3 rows)
523+
partlockt_idx | ExclusiveLock | relation | master
524+
(4 rows)
485525

486526
select * from locktest_segments where coalesce not like 'gp_%' and coalesce not like 'pg_%';
487527
coalesce | mode | locktype | node

src/test/regress/expected/shrink_table.out

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -807,15 +807,15 @@ CREATE TABLE shrink_table2(a int) distributed by (a);
807807
CREATE VIEW shrink_view AS select * from shrink_table1;
808808
CREATE rule "_RETURN" AS ON SELECT TO shrink_table2
809809
DO INSTEAD SELECT * FROM shrink_table1;
810+
ERROR: relation "shrink_table2" cannot have ON SELECT rules
811+
DETAIL: This operation is not supported for tables.
810812
ALTER TABLE shrink_table2 shrink TABLE to 2;
811-
ERROR: "shrink_table2" is not a table, materialized view, or foreign table
812813
ALTER TABLE shrink_view shrink TABLE to 2;
813-
ERROR: "shrink_view" is not a table, materialized view, or foreign table
814+
ERROR: ALTER action ALTER COLUMN ... SHRINK TABLE cannot be performed on relation "shrink_view"
815+
DETAIL: This operation is not supported for views.
814816
ALTER TABLE shrink_table1 shrink TABLE to 2;
815817
drop table shrink_table1 cascade;
816-
NOTICE: drop cascades to 2 other objects
817-
DETAIL: drop cascades to view shrink_view
818-
drop cascades to view shrink_table2
818+
NOTICE: drop cascades to view shrink_view
819819
--
820820
-- Test shrinking a table with a domain type as distribution key.
821821
--

0 commit comments

Comments
 (0)