Skip to content

Commit 677f146

Browse files
Alter test results to comply with new ALTER TABLE behaviour.
1 parent 1f70560 commit 677f146

File tree

2 files changed

+35
-39
lines changed

2 files changed

+35
-39
lines changed

src/test/regress/expected/alter_table.out

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,90 +1568,88 @@ and c.relname != 'my_locks'
15681568
group by c.relname;
15691569
create table alterlock (f1 int primary key, f2 text);
15701570
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "alterlock_pkey" for table "alterlock"
1571-
-- share update exclusive
15721571
begin; alter table alterlock alter column f2 set statistics 150;
15731572
select * from my_locks order by 1;
1574-
relname | max_lockmode
1575-
-----------+--------------------------
1576-
alterlock | ShareUpdateExclusiveLock
1573+
relname | max_lockmode
1574+
-----------+---------------------
1575+
alterlock | AccessExclusiveLock
15771576
(1 row)
15781577

15791578
rollback;
15801579
begin; alter table alterlock cluster on alterlock_pkey;
15811580
select * from my_locks order by 1;
1582-
relname | max_lockmode
1583-
----------------+--------------------------
1584-
alterlock | ShareUpdateExclusiveLock
1585-
alterlock_pkey | ShareUpdateExclusiveLock
1581+
relname | max_lockmode
1582+
----------------+---------------------
1583+
alterlock | AccessExclusiveLock
1584+
alterlock_pkey | AccessExclusiveLock
15861585
(2 rows)
15871586

15881587
commit;
15891588
begin; alter table alterlock set without cluster;
15901589
select * from my_locks order by 1;
1591-
relname | max_lockmode
1592-
-----------+--------------------------
1593-
alterlock | ShareUpdateExclusiveLock
1590+
relname | max_lockmode
1591+
-----------+---------------------
1592+
alterlock | AccessExclusiveLock
15941593
(1 row)
15951594

15961595
commit;
15971596
begin; alter table alterlock set (fillfactor = 100);
15981597
select * from my_locks order by 1;
1599-
relname | max_lockmode
1600-
-----------+--------------------------
1601-
alterlock | ShareUpdateExclusiveLock
1602-
pg_toast | ShareUpdateExclusiveLock
1598+
relname | max_lockmode
1599+
-----------+---------------------
1600+
alterlock | AccessExclusiveLock
1601+
pg_toast | AccessExclusiveLock
16031602
(2 rows)
16041603

16051604
commit;
16061605
begin; alter table alterlock reset (fillfactor);
16071606
select * from my_locks order by 1;
1608-
relname | max_lockmode
1609-
-----------+--------------------------
1610-
alterlock | ShareUpdateExclusiveLock
1611-
pg_toast | ShareUpdateExclusiveLock
1607+
relname | max_lockmode
1608+
-----------+---------------------
1609+
alterlock | AccessExclusiveLock
1610+
pg_toast | AccessExclusiveLock
16121611
(2 rows)
16131612

16141613
commit;
16151614
begin; alter table alterlock set (toast.autovacuum_enabled = off);
16161615
select * from my_locks order by 1;
1617-
relname | max_lockmode
1618-
-----------+--------------------------
1619-
alterlock | ShareUpdateExclusiveLock
1620-
pg_toast | ShareUpdateExclusiveLock
1616+
relname | max_lockmode
1617+
-----------+---------------------
1618+
alterlock | AccessExclusiveLock
1619+
pg_toast | AccessExclusiveLock
16211620
(2 rows)
16221621

16231622
commit;
16241623
begin; alter table alterlock set (autovacuum_enabled = off);
16251624
select * from my_locks order by 1;
1626-
relname | max_lockmode
1627-
-----------+--------------------------
1628-
alterlock | ShareUpdateExclusiveLock
1629-
pg_toast | ShareUpdateExclusiveLock
1625+
relname | max_lockmode
1626+
-----------+---------------------
1627+
alterlock | AccessExclusiveLock
1628+
pg_toast | AccessExclusiveLock
16301629
(2 rows)
16311630

16321631
commit;
16331632
begin; alter table alterlock alter column f2 set (n_distinct = 1);
16341633
select * from my_locks order by 1;
1635-
relname | max_lockmode
1636-
-----------+--------------------------
1637-
alterlock | ShareUpdateExclusiveLock
1634+
relname | max_lockmode
1635+
-----------+---------------------
1636+
alterlock | AccessExclusiveLock
16381637
(1 row)
16391638

16401639
rollback;
16411640
begin; alter table alterlock alter column f2 set storage extended;
16421641
select * from my_locks order by 1;
1643-
relname | max_lockmode
1644-
-----------+--------------------------
1645-
alterlock | ShareUpdateExclusiveLock
1642+
relname | max_lockmode
1643+
-----------+---------------------
1644+
alterlock | AccessExclusiveLock
16461645
(1 row)
16471646

16481647
rollback;
1649-
-- share row exclusive
16501648
begin; alter table alterlock alter column f2 set default 'x';
16511649
select * from my_locks order by 1;
1652-
relname | max_lockmode
1653-
-----------+-----------------------
1654-
alterlock | ShareRowExclusiveLock
1650+
relname | max_lockmode
1651+
-----------+---------------------
1652+
alterlock | AccessExclusiveLock
16551653
(1 row)
16561654

16571655
rollback;

src/test/regress/sql/alter_table.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,6 @@ group by c.relname;
11751175

11761176
create table alterlock (f1 int primary key, f2 text);
11771177

1178-
-- share update exclusive
11791178
begin; alter table alterlock alter column f2 set statistics 150;
11801179
select * from my_locks order by 1;
11811180
rollback;
@@ -1212,7 +1211,6 @@ begin; alter table alterlock alter column f2 set storage extended;
12121211
select * from my_locks order by 1;
12131212
rollback;
12141213

1215-
-- share row exclusive
12161214
begin; alter table alterlock alter column f2 set default 'x';
12171215
select * from my_locks order by 1;
12181216
rollback;

0 commit comments

Comments
 (0)